I use LINQ To SQL and create my database using the CreateDatabase method. I understand from MSDN that the syntax for creating an automatically generated primary key field is
[Column(Storage="_ID", IsPrimaryKey=true, AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
Can someone explain to me what this means AutoSync.OnInsert and what is the use of the other members of the AutoSync enumeration? .Ie. AutoSync.Always, AutoSync.Default, etc.
And what is the meaning of the word "Identity" in DbType when I already specified the column as a primary key?
source
share