.net - EF Code-first: how to cache DbCompiledModel? -


I have set up a simple test project for EF 4.1 RC, what I am looking at using code-afrach , That every call is taking a long time near the new MyContact (). I found, that there is a manufacturer who accepts DB Complex Module and details say, for better performance, it is good to cache this item. But how can I get a DB complied model from the current context and there are no samples on the net.

The model has already been cached. You can easily validate your OnModelCreating method by putting breakpaying. This will only be the first time you make reference, hit. If you want to create DbCompiledModel manually, then you must first create DbModelbuilder outside of your reference using its build method and then Collect resulting DB Model .

Comments