This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a model which I used to create a database. It specified the primary key Identity Specification as No. I want this to be Set to Yes and also set Identity Increment and (Is Identity). How do you go about doing this in the model? |
|
|
Set the Identity method to "IdentityColumn" on the entity to have this reflected when creating the table. There is no option for setting the Identity Increment however as this is a database specific attribute this needs to be managed manually. If you are just creating things adhoc you will want to just change this setting manually, if you are scripting this out just update the scripts accordingly or if you are using migrations you will want to either create the table manually by using ExecuteNativeCommand or apply an ALTER TABLE after creation via ExecuteNativeCommand.
|
|
|
Thanks. |
|