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

Consider moving DeleteBehavior enum to core namespace #8632

Closed
divega opened this issue May 29, 2017 · 0 comments
Closed

Consider moving DeleteBehavior enum to core namespace #8632

divega opened this issue May 29, 2017 · 0 comments
Labels
breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@divega
Copy link
Contributor

divega commented May 29, 2017

(I hit this while writing some code today. Not sure if there are other similar cases.)

The fact that you have to bring the 'Microsoft.EntityFrameworkCore.Metadata' in order to resolve the argument of a pretty standard OnDelete() fluent API IMO hinders usability.

I would expect the negative impact of a change like this in 2.0 to be low.

@ajcvickers ajcvickers self-assigned this May 31, 2017
@ajcvickers ajcvickers added this to the 2.0.0-preview2 milestone May 31, 2017
ajcvickers added a commit that referenced this issue Jun 5, 2017
…and Restrict in the database

Issues #8654, #8632, #8633

The new behavior is called 'ClientSetNull'.
'Restrict' now throws on SaveChanges if EF would have set null. This is the same behavior that has always been there for required relationships, so this is only a break for optional relationships explicitly configured with Restrict, which should be relatively rare since this was the default anyway. The default is now 'ClientSetNull', which matches the old behavior of 'Restrict', so apps that were not setting anything explicitly will not get a breaking change.
ajcvickers added a commit that referenced this issue Jun 5, 2017
…and Restrict in the database

Issues #8654, #8632, #8633

The new behavior is called 'ClientSetNull'.
'Restrict' now throws on SaveChanges if EF would have set null. This is the same behavior that has always been there for required relationships, so this is only a break for optional relationships explicitly configured with Restrict, which should be relatively rare since this was the default anyway. The default is now 'ClientSetNull', which matches the old behavior of 'Restrict', so apps that were not setting anything explicitly will not get a breaking change.
ajcvickers added a commit that referenced this issue Jun 5, 2017
…and Restrict in the database

Issues #8654, #8632, #8633

The new behavior is called 'ClientSetNull'.
'Restrict' now throws on SaveChanges if EF would have set null. This is the same behavior that has always been there for required relationships, so this is only a break for optional relationships explicitly configured with Restrict, which should be relatively rare since this was the default anyway. The default is now 'ClientSetNull', which matches the old behavior of 'Restrict', so apps that were not setting anything explicitly will not get a breaking change.
ajcvickers added a commit that referenced this issue Jun 6, 2017
…and Restrict in the database

Issues #8654, #8632, #8633

The new behavior is called 'ClientSetNull'.
'Restrict' now throws on SaveChanges if EF would have set null. This is the same behavior that has always been there for required relationships, so this is only a break for optional relationships explicitly configured with Restrict, which should be relatively rare since this was the default anyway. The default is now 'ClientSetNull', which matches the old behavior of 'Restrict', so apps that were not setting anything explicitly will not get a breaking change.
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 6, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview2, 2.0.0 Oct 15, 2022
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants