-
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
How can I set onUpdate constraint globally? #12134
Comments
@AuthorProxy The code you show is essentially the recommended way to do this. The convention system does not yet have public API (#214) and is designed more for providers than applications. That being said, once the API is public you should be able to use it to process a custom attribute, but it's not clear that it would be better than what you are already doing. |
@ajcvickers I am sorry, maybe I have asked not clearly, and should duplicate question at the body, the question is how to set |
@AuthorProxy Sorry about that. Cascading updates are not yet supported by EF--this is being tracked by #10551. You'll need to add SQL to the Migration if you want to create cascading updates manually, but keep in mind that EF will not be aware of them and this could result in tracked entities getting out of sync with those in the database. |
Currently, I can globally set onDelete constraint via DeleteBehavior
How I can make something similar for
OnUpdate
constraint via attributes, conventions or|and globally like the sample upperThe text was updated successfully, but these errors were encountered: