šljaker
šljaker

Reputation: 7374

EntityFramework CF and Pre-Generate Views

I want to reduce startup-time by using Pre-Generate Views as described on the following link: http://msdn.microsoft.com/en-us/library/bb896240.aspx

Can I use Pre-Generate Views in Code First approach and how?

Any help would be greatly appreciated.

Upvotes: 0

Views: 874

Answers (4)

JotaBe
JotaBe

Reputation: 39025

EF Power Tools Beta 3 includes pre-generating views for Code First, as you can see at the bottom of this blog post

EF Power Tools Beta 3 Available

You can download this tool from Visual Studio Gallery

Upvotes: 0

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364289

EF Power Tools CTP1 contain feature called Optimize Entity Data Model which should be equivalent to pre-generating views for EDMX.

Upvotes: 1

Giorgio Minardi
Giorgio Minardi

Reputation: 2775

looks like Pre-generated views are not supported by Code First (no precompiled queries in EF http://blogs.msdn.com/b/adonet/archive/2011/03/02/ef-4-1-is-coming-dbcontext-api-amp-code-first-rtw.aspx ). Here you can find some performance tips for EF : http://msdn.microsoft.com/en-us/library/cc853327.aspx You can however reverse your DbContext and extract the EDMX using the EF Power Tools, once done that you can tune your queries.

Upvotes: 0

Eranga
Eranga

Reputation: 32447

Unfortunately you can not use them in Code First.

Upvotes: 0

Related Questions