- 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:
public static IModel Instance
{
get
{
//if (_instance == null)
{
_instance = new BlogsContextModel();
_instance.Initialize();
_instance.Customize();
}
return _instance;
}
}- Run benchmark again