James Hancock
James Hancock

Reputation: 3547

Entity Framework Powertools - Code First Generate Views On Build

Right now Power Tools Beta 4 provides generation of views with a right click. This is fine as far as it goes but can cause issues because you have to remember to do it.

Is there any way that I can make it do the generation of views at compile time? (i.e. some sort of pre-build action or something?

Thanks!

Upvotes: 1

Views: 1461

Answers (1)

Pawel
Pawel

Reputation: 31610

You can use T4 templates for generating views I created a while ago. Take a look here for the EF5 version and here for the EF6 version. You will need to do some MSBuild work to make the T4 template run on Build. You can take a look at comments for this blog post where this is discussed a little bit.

EDIT I also recently published Interactive Views for EF6 on NuGet so now you can have pre-generated views without having to generate them at the build time.

Upvotes: 2

Related Questions