Skip to content
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

Ability to set DeleteBehavior via ForeignKey annotation #17738

Closed
dmarlow opened this issue Sep 10, 2019 · 4 comments
Closed

Ability to set DeleteBehavior via ForeignKey annotation #17738

dmarlow opened this issue Sep 10, 2019 · 4 comments
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. customer-reported type-enhancement

Comments

@dmarlow
Copy link

dmarlow commented Sep 10, 2019

To set the OnDelete referential action, you must have the ICollection navigation property defined in order to even use the ModelBuilder's WithMany and HasForeignKey fluent methods.

I'd like to be able to easily and quickly set the OnDelete action via the ForeignKey attribute on the one navigation property that's defined.

@AndriySvyryd
Copy link
Member

Related to #10864

@divega divega added this to the Backlog milestone Sep 11, 2019
@divega divega added good first issue This issue should be relatively straightforward to fix. needs-design and removed good first issue This issue should be relatively straightforward to fix. labels Sep 11, 2019
@smitpatel
Copy link
Contributor

Also see #9621

Outstanding question. Should we add a separate attribute for DeleteBehavior or try to change ForeignKeyAttribute?

@ajcvickers
Copy link
Member

@smitpatel We should not touch anything in DataAnnotations unless we absolutely have to. Can of worms.

@smitpatel
Copy link
Contributor

We will provide functionality of DeleteBehavior with it's own attribute as being tracked in #9621

Closing as won't fix since we don't plan to change ForeignKeyAttribute.

@smitpatel smitpatel removed this from the Backlog milestone Feb 22, 2020
@smitpatel smitpatel added closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. and removed needs-design labels Feb 22, 2020
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. customer-reported type-enhancement
Projects
None yet
Development

No branches or pull requests

5 participants