-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Disable startup assembly support for MSBuild integration #34034
Conversation
54698c0
to
e691179
Compare
Allow DbContextAttribute to be used to find the referenced context types
ee3398c
to
4e64131
Compare
@@ -474,8 +474,19 @@ where i.IsGenericType | |||
} | |||
} | |||
|
|||
// Look for DbContext classes registered in the service provider | |||
// Look for DbContextAttribute on the assembly | |||
var appServices = _appServicesFactory.Create(_args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this suffers from the same technicality as #27322. That is, even if we find a context by this mechanism, it could actually be a different one than would have been returned by running service discovery, if it were working correctly at design time. So we could end up working with the "wrong" context type. I personally think this is very unlikely, but it has been the sticking point on #27322 over the years.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I plan to fix #27322 separately.
Also, I want to discuss this change in a design meeting.
I disabled auto merge, please check in after #34043 |
Allow
DbContextAttribute
to be used to find the referenced context types