dotnet/efcore

commandTimeout for some query only

Open

#18,895 建立於 2019年11月14日

在 GitHub 查看
 (12 留言) (2 反應) (0 負責人)C# (3,376 fork)batch import
area-querycustomer-reportedgood first issueneeds-design

倉庫指標

Star
 (14,651 star)
PR 合併指標
 (平均合併 23天 13小時) (30 天內合併 154 個 PR)

描述

some query may take long time to complete, so I'm wondering if we could have an api for set command out for the long-time query only, not global?

maybe an extension method like follows:

var posts = dbContext.Posts.AsNoTracking()
    .Where(p=>p.Tile == "12131313")
    .WithCommandTimeout(20)
    .ToList();

貢獻者指南