dotnet/efcore

commandTimeout for some query only

オープン

#18,895 opened on 2019/11/14

 (12 件のコメント) (2 件のリアクション) (0 人の担当者)C# (3,376 件のフォーク)batch import
area-querycustomer-reportedgood first issueneeds-design

Repository metrics

Stars
 (14,651 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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();

コントリビューターガイド