Click here to Skip to main content
15,891,903 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm working on an desktop app using (wpf , EF Core) and i note that response little bit slow in first query when application run first time , then every thing ok
what is the cause of this problem? and how can i handel it ?

What I have tried:

i can't solve it , the problem still
Posted
Updated 16-Feb-19 19:43pm

That is the "warm up time" for EF. It's doing a first connection to the database and verifying that the structure matches what it expects in order to work with your context.

There is nothing you can do to "fix" that.
 
Share this answer
 
Comments
Maciej Los 17-Feb-19 16:38pm    
5ed!
You run a scheduler that every morning fires off the "first query of the day" while everyone else is sleeping.
 
Share this answer
 
Comments
Maciej Los 17-Feb-19 16:40pm    
:laugh:
I like answers like that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900