views:

281

answers:

1

I've gotten to that point in one of my projects, and haven't found much information out there. So if you've got some pointers for improving performance in the new Entity Framework 4, please let us know!

+2  A: 

One way to get a performance gain is to pre-generate the Views.

Before a query can be executed, the Entity Framework generates a set of views that are used to access the database. The Entity Framework generates views the first time that a query is executed and then maintains these views for the lifetime of the ObjectContext instance. Because view generation is a significant part of the overall cost of executing a single query, the Entity Framework enables you to pre-generate these views and include them in the compiled project.

From MSDN

Here's how you pre-generate views in EF4

willbt