Search Results for

    Show / Hide Table of Contents

    Class InheritanceMappingAttribute

    Defines to which type linq2db should map record based on discriminator value. You can apply this attribute to a base class or insterface, implemented by all child classes. Don't forget to define discriminator value storage column using IsDiscriminator.

    Inheritance
    System.Object
    MappingAttribute
    InheritanceMappingAttribute
    Namespace: LinqToDB.Mapping
    Assembly: linq2db.dll
    Syntax
    public class InheritanceMappingAttribute : MappingAttribute
    Remarks

    You cannot configure inheritance mapping using this attribute for discriminator types, not supported by .NET attributes. See document for a list of supported types.

    Properties

    | Improve this Doc View Source

    Code

    Gets or sets discriminator value.

    Declaration
    public object? Code { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Object>
    | Improve this Doc View Source

    Configuration

    Gets or sets mapping schema configuration name, for which this attribute should be taken into account. ProviderName for standard names. Attributes with null or empty string Configuration value applied to all configurations (if no attribute found for current configuration).

    Declaration
    public string? Configuration { get; set; }
    Property Value
    Type Description
    System.Nullable<System.String>
    | Improve this Doc View Source

    IsDefault

    Get or sets flag, that tells linq2db that current mapping should be used by default if suitable mapping type not found.

    Declaration
    public bool IsDefault { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Type

    Gets or sets type, to which record with current discriminator value should be mapped.

    Declaration
    public Type Type { get; set; }
    Property Value
    Type Description
    Type

    Methods

    | Improve this Doc View Source

    GetObjectID()

    Declaration
    public override string GetObjectID()
    Returns
    Type Description
    System.String
    Overrides
    MappingAttribute.GetObjectID()

    Extension Methods

    Map.DeepCopy<T>(T)
    Sql.IsDistinctFrom<T>(T, T)
    Sql.IsNotDistinctFrom<T>(T, T)
    SqlExtensions.In<T>(T, IEnumerable<T>)
    SqlExtensions.In<T>(T, IQueryable<T>)
    SqlExtensions.In<T>(T, T[])
    SqlExtensions.In<T>(T, T, T)
    SqlExtensions.In<T>(T, T, T, T)
    SqlExtensions.NotIn<T>(T, IEnumerable<T>)
    SqlExtensions.NotIn<T>(T, IQueryable<T>)
    SqlExtensions.NotIn<T>(T, T[])
    SqlExtensions.NotIn<T>(T, T, T)
    SqlExtensions.NotIn<T>(T, T, T, T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2011-2022 linq2db.com

    Generated by DocFX