dotnet/efcore

commandTimeout for some query only

Open

Aperta il 14 nov 2019

Vedi su GitHub
 (12 commenti) (2 reazioni) (0 assegnatari)C# (14.651 star) (3376 fork)batch import
area-querycustomer-reportedgood first issueneeds-design

Descrizione

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

Guida contributor