It takes a while (3 minutes+) to 'create/compile' my DbContext. The web server starts in about 5 seconds, but when I do the first query to my database, EF 2.0 has to 'build/create/compile' the database in memory or something, I think? The next requests are almost instant. This was a Database First creation of the DbContext, the database already exists in MSSQL and has data. The DbContext contains about 500 DbSet's with relations.
Is there a way to speed this up by doing the 'creation(mapping?)' of my Entity Framework's DbContext before running the web server (at developmenttime), create the file/mappings it needs, so the first request is fast too?
In general this is normal Entity framework behavior by default, but from other side of cause there are some ways to resolve this course of things.
For example you can try:
Please try to read this articles: