UninitializedDbSetDiagnosticSuppressor doesn't work when a constructor is present #26879
Labels
area-analyzer
area-dbcontext
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
#21608 introduced a DiagnosticsSuppressor to suppress CS8618 (non-nullable property is uninitialized) for DbSet properties on DbContexts. This currently works fine as long as there is no constructor on the DbContext, but fails if a constructor is defined, since the diagnostic is reported on the constructor declaration, and not on the property.
Roslyn issue: dotnet/roslyn#58073
The text was updated successfully, but these errors were encountered: