Search Results for

    Show / Hide Table of Contents

    Class PrimaryKeyAttribute

    Marks property or field as a member of primary key for current mapping type.

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

    Constructors

    | Improve this Doc View Source

    PrimaryKeyAttribute()

    Creates attribute instance.

    Declaration
    public PrimaryKeyAttribute()
    | Improve this Doc View Source

    PrimaryKeyAttribute(Int32)

    Creates attribute instance.

    Declaration
    public PrimaryKeyAttribute(int order)
    Parameters
    Type Name Description
    System.Int32 order

    Column order in composite primary key.

    | Improve this Doc View Source

    PrimaryKeyAttribute(Nullable<String>, Int32)

    Creates attribute instance.

    Declaration
    public PrimaryKeyAttribute(string? configuration, int order)
    Parameters
    Type Name Description
    System.Nullable<System.String> configuration

    Mapping schema configuration name. See Configuration.

    System.Int32 order

    Column order in composite primary key.

    Properties

    | 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

    Order

    Gets or sets order of current column in composite primary key. Order is used for query generation to define in which order primary key columns must be mentioned in query from columns with smallest order value to greatest. Default value: -1.

    Declaration
    public int Order { get; set; }
    Property Value
    Type Description
    System.Int32

    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