Before querying any data from a database, Entity Framework needs to generate a set of query views for the model. This is a performance-costly operation, and by default it is executed once when executing the first Entity Framework query. However to avoid performance losses when executing the first query, these views can be pregenerated when starting an application.
The following templates support Entity Framework view pregeneration for Entity Framework 1, 4, and 5:
• | EntityObject |
• | POCO |
• | Self-Tracking Entity |
• | DbContext (for Entity Framework 1 XML Mapping must be used for view pregeneration - the Fluent Mapping template property is set to False; for Entity Framework 4 and 5 fluent mapping also can be used) |
View pregeneration for Entity Framework 6 is not supported.
To enable view pregeneration select the View Generation check box on the General tab of the Model Settings dialog box.