database - How do you make a column an auto incremented primary key in the various .NET ORMs? -


How do you do a column (let's call it OrderID ) into an automatic increase Primary key different NAT ORMs?

Linq for SQL

  • [Column (name = "order id", IsPrimaryKey = true, IsDbGenerated = true)] [EntityKeyProperty = true, IsNullable = false]
  • / Code> (Is not possible to specify autoinc?)

NHibernate

  • [id (name To get a one-stop answer to this question I have started this question and to ask for more information from the .NET community. If you do not have an ORM listed here If you are using, please edit this question and post the appropriate attributes.

In Habanero ( ) You can set it through Class Diff.XML as the following:

Property Name = "AutoConingProp" Type = "Int 32" Auto Inputing = "True"

Or You can set Autogenerate (this will generate ClassDefs with AutoIncrementing.)

or if you are using more fluent syntax Ie if you are not set up to business objects through ClassDefs, you.

BOPR Auto Encryption Prag = new BOPORP (......., true.);

or auto-encribining prof.autoinecriting = true;


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -