forked from dotnet/efcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
You can't fire me because I quit! (Change from Added to Deleted resul…
…ts in detached entity) See issue dotnet#351. When an entity is in the Added state it means that it doesn't exist in the database and should be inserted during SaveChanges. If the state is then changed to Deleted this would mean delete an entity that doesn't exist in the database, which will fail. In the EF6 stack we instead detach the entity in this case so that it is just never inserted. This change implements the same behavior in EF7.
- Loading branch information
1 parent
1a376a0
commit 510f234
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters