Skip to content

UninitializedDbSetDiagnosticSuppressor doesn't work when a constructor is present #26879

@roji

Description

@roji

#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

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions