Reputation: 502
Setting up my poco objects with Guid Id's and they seem to at least store as expected... but I dont see it creating new Guid's for Id's unless done manually so. Is there a trick to setting it up so that db.CreateDatabase() will set the id field as Identity specification (mssql server) or simply auto fill it in with say Guid.NewGuid()?
Upvotes: 3
Views: 574
Reputation: 3149
You are responsible for creating your own Guids
If your ids were integers then you could work with the [AutoIncrement] attribute and have more options but you are on your own for Guids.
Upvotes: 3