Sep 10, 2019 05:45 AM|Brando ZWZ|LINK
According to the MSDN article:
One of the biggest drags on performance is the startup time involved with the first use of a context in an application process. You can do a lot to improve that startup time, though. Hopefully you’ve already learned these tricks
from my own writing or other resources, such as the MSDN doc on performance considerations at bit.ly/3D6AiC.
A startup step that often hampers performance is the view generation of mapping views, where EF creates the relevant SQL to query against each of the entity sets in the model. These views get leveraged as your app runs so that
for certain queries, EF doesn’t have to work out the SQL on the fly. View generation happens whether you created your model with the EF Designer or with Code First.
You can pre-generate these views and compile them into the application to save time.
More details, you could refer to this