Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 553 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 553 Bytes

CompiledModelsDemo

  1. Run the benchemark
  2. Compile a model - dotnet ef dbcontext optimize --output-dir MyCompiledModels --namespace MyCompiledModels
  3. Update OnConfiguring to use the compiled model
  4. Comment out the caching in BlogsContextModel:
public static IModel Instance
{
    get
    {
        //if (_instance == null)
        {
            _instance = new BlogsContextModel();
            _instance.Initialize();
            _instance.Customize();
        }
        
        return _instance;
    }
}
  1. Run benchmark again