Disabling identity (auto-incrementing) on integer primary key using code first
- by gw0
I am using code first approach in a ASP.NET MVC 3 application and all integer primary keys in models (public int Id { get; set; }) are by default configured as an identity with auto-incrementing. How to disable this and enable a way to manually enter the integer for the primary key?
The actual situation is that the Id integers have a special…