jamesmanning / EFReverseEngineerCodeFirstTemplates

A set of T4 template files you can use with the Entity Framework Power Tools for generating code-first classes from an existing database. For more details, see the original blog post from Rowan Miller at http://romiller.com/2012/05/09/customizing-reverse-engineer-code-first-in-the-ef-power-tools/
7 stars 4 forks source link

Support for auto generated key's #2

Open rogerfar opened 10 years ago

rogerfar commented 10 years ago

Hi James,

I was wondering if you know a quick solution to add the auto generated GUID PK's as the [Key] attribute, like this: [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]

Otherwise the result looks great!

jamesmanning commented 10 years ago

I don't, but TBH I think anyone still using the power tool version is better off switching to Simon Hughes' project @ https://efreversepoco.codeplex.com/

rogerfar commented 10 years ago

Problem with that library is that it's all fluent API where I would much rather use data annotations.

notdabob commented 10 years ago

I'm in the same boat on that one I'd much rather have it as annotations.

With all the options it includes it's kind of odd that it doesn't support annotations, probably be a reasonable feature to add On 5/30/14, 1:03 AM, Rogier Versluis wrote:

Problem with that library is that it's all fluent API where I would much rather use data annotations.

— Reply to this email directly or view it on GitHub https://github.com/jamesmanning/EFReverseEngineerCodeFirstTemplates/issues/2#issuecomment-44615385.