Reputation: 22297
I'm using the following T4 template (http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx) to pre-compile my Entity Framework 4 "Views" from a EDMX targeting an existing SQL Server 2008 database.
(aside: this does help speed up the performance hit on the first SaveChanges
-- I have over 200 tables and the first SaveChanges
went from 10 seconds to 5 seconds -- still not impressed but an improvement).
My question is: are these pre-compiled views still "safe" to use with SQL CE 4 (i.e. in unit tests) or are they tied to SQL Server 2008? I ask because the generated view file appears to contain SQL statements and I wonder if they might be provider specific.
Upvotes: 0
Views: 569
Reputation: 32447
The EDMX file has SSDL information which has hard coded provider specific detail. Here are some articles explaining the procedure to change the provider
Regarding the performance issue you maybe able to split your database into multiple EDMX files. For example having separate contexts for "Marketing" and "Sales".
Upvotes: 1