EF Core 3, optimize lots of Include/ThenInclude

前端 未结 4 899
予麋鹿
予麋鹿 2021-01-06 04:39

I have a query like this

return await _ctx.Activities
            .Include(a => a.Attributes)
            .Include(a => a.Roles)
            .Include(a         


        
4条回答
  •  迷失自我
    2021-01-06 05:07

    If you know how many times the result of your query can change during the day. Keeping the query result in cache is not the first request, but it is faster to get the result of the next requests.

提交回复
热议问题