-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude CS8618 for DbSet<T> in a derived DbContext class #45912
Comments
I think that this issue doesn't belong here, should go to ef core repository. As a workaround you can disable it for certain files via .editorconfig file. |
@Dreamescaper How EF Core's team may be able to fix that? I think it should be excluded by the compiler (less noisy than disabling warning or adding |
cc: @ajcvickers May you take a look? |
They can create DiagnosticSuppressor for this purpose. |
@Dreamescaper Great. I didn't knew about it before, but it looks like the correct fix. I'll wait for @ajcvickers to move the issue to efcore repo |
See this article from EF Core docs.
There is a workaround mentioned in the docs to add
= null!
, but I feel it's reasonable to exclude any public DbSet that exists in a class derived from DbContext by default.The text was updated successfully, but these errors were encountered: