Internal code only caches metadata, so once the first context has been created, you should see very few performance differences between Code-Only and EDMX.
You are right that a large number of objects can slow down EF.
Prenatal views are often recommended to support performance using large models. But this function depends on the availability of the EDMX file, so it is not surprising that it does not work with Code-Only.
However, if you find that you need to precompile the views, you can always use the ToEdmx () ββfunction for CodeOnly to move from the CodeOnly world to the standard EDMX world. And, of course, once in the EDMX world, you can precompile your views.
However, this is not necessarily the approach I would take.
I think that a context with 100 or more IQueryable properties is in any case less ideal for use.
Therefore, instead of moving from codes only to representations to Gen, I would probably use the Code-Only ability to simplify the creation of smaller target subdomains to minimize the effective model size for the part of the Application that you are working on.
The result will be a series of fast, easy-to-use ObjectContexts designed for the current set of tasks.
Which IMHO is much more desirable.
Hope this helps
Alex
source share