I am using Entity framework 6.2.0 with WebAPI hosted on azure app service.
My database is not big with only two tables and I have a simple select query
Account account = Db.Accounts.Where(p => p.Code == Code && p.PersonId ==
PersonId).Include("Options").FirstOrDefaultAsync();
What i am struggling with is, when I deploy this on azure. and whenever i make the first call to the api which uses above query or when there is a significant gap of few minutes or 1 hour between two calls, Above process takes a long time to complete .almost 20-25 seconds, The next call is in less than a second.
I have confirmed, that it's definitely not my network latency or something else that is slowing this down.
Does anyone have a clue what I can look at?
My entity framework implementation is database-first.