Description
The below code is not able to have the ternary operator extracted as it's part of a linq query, so the whole thing has to be run against each record.
Reproducer
var query = context.Checklist
.AsNoTracking()
.Where(...)
.Select(x => new {
ReviewStatus = x.ReviewApprovedUtc.HasValue ? "Approved" : x.ReviewRejectedUtc.HasValue ? "Rejected" : x.ReviewRequestedUtc.HasValue ? "Pending" : null,
Product and Version
SonarAnalyzer.CSharp 10.23.0.137933
Description
The below code is not able to have the ternary operator extracted as it's part of a linq query, so the whole thing has to be run against each record.
Reproducer
Product and Version
SonarAnalyzer.CSharp 10.23.0.137933