dotnet/efcore

commandTimeout for some query only

開放

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

 (12 則留言) (2 個反應) (0 位負責人)C# (3,376 個分叉)batch import
area-querycustomer-reportedgood first issueneeds-design

倉庫指標

星標
 (14,651 顆星)
PR 合併指標
 (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();

貢獻者指南