- Run the benchemark
- Compile a model -
dotnet ef dbcontext optimize --output-dir MyCompiledModels --namespace MyCompiledModels - Update OnConfiguring to use the compiled model
- Comment out the caching in
BlogsContextModel:
publicstaticIModelInstance{get{//if (_instance == null){_instance=newBlogsContextModel();_instance.Initialize();_instance.Customize();}return_instance;}}- Run benchmark again