Chris Nevill
Chris Nevill

Reputation: 6151

Entity Framework Reverse Engineer using Power Tools - No Primary Keys

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

Answers (1)

Mark Oreta
Mark Oreta

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

Related Questions