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

贡献者指南