Reputation: 6151
I've used the Entity Framework Power Tools Beta 2 to reverse engineer my model classes. However no primary keys have been declared in the data annotations. Is there a way to do this?
Upvotes: 0
Views: 1163
Reputation: 10416
By default, the mapping done via fluent.
If you want to change that, you can customize the TT files used to generate the model. Where you would remove it from the mapping.tt and then add the data annotation to entity.tt. Rowan Miller made a great post about that.
Upvotes: 1