Repository navigation
EFDoctor 0.3.0
Two new rules, both from the roadmap's "Next" tier, for 22 in all.
Added
- EFD027: two EF Core operations running at once on the same
DbContextinstance, which makes EF Core throw "A second operation was started on this context instance" depending on timing. Reported atWarningseverity with high confidence under theReliabilitycategory, for operations passed together toTask.WhenAll/Task.WhenAny, an operation started while an earlier task local is still pending, and operations projected bySelectover a captured context into a task combinator. The same instance is proven by symbol, so separate contexts fromIDbContextFactoryare never reported. - EFD029: a second
OrderByorOrderByDescendingthat discards an earlier ordering in the same query, whereThenBywas meant. EF Core translates only the lastOrderBy, so the query sorts by the replacing key alone. Reported atWarningseverity with high confidence under theCorrectnesscategory. A second ordering afterSkip,Take,Distinct, or a projection, and a default ordering overridden through a local, are not reported.