Search Results for

    Show / Hide Table of Contents
    View Source

    Class PrimaryKeyColumnAttribute

    Attribute that represents a Primary Key

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class PrimaryKeyColumnAttribute : Attribute
    Remarks

    By default, Clustered and AutoIncrement is set to true.

    Constructors

    View Source

    PrimaryKeyColumnAttribute()

    Declaration
    public PrimaryKeyColumnAttribute()

    Properties

    View Source

    AutoIncrement

    Gets or sets a boolean indicating whether the primary key is auto incremented.

    Declaration
    public bool AutoIncrement { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Defaults to true

    View Source

    Clustered

    Gets or sets a boolean indicating whether the primary key is clustered.

    Declaration
    public bool Clustered { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Defaults to true

    View Source

    IdentitySeed

    Gets or sets the Identity Seed, which is used for Sql Ce databases.

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

    We'll only look for changes to seeding and apply them if the configured database is an Sql Ce database.

    View Source

    Name

    Gets or sets the name of the PrimaryKey.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Overrides the default naming of a PrimaryKey constraint: PK_tableName

    View Source

    OnColumns

    Gets or sets the names of the columns for this PrimaryKey.

    Declaration
    public string OnColumns { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Should only be used if the PrimaryKey spans over multiple columns. Usage: [nodeId], [otherColumn]

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PrimaryKeyColumnAttribute()
    • Properties
      • AutoIncrement
      • Clustered
      • IdentitySeed
      • Name
      • OnColumns
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX