© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago
bookuha

Phantom constraint

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK__appointme__patie__37A5467C". The conflict occurred in database "Clinic", table "dbo.appointments", column 'patient'.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK__appointme__patie__37A5467C". The conflict occurred in database "Clinic", table "dbo.appointments", column 'patient'.


Why?
Appointments are not really dependant
unknown.png
unknown.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Tighter type constraint
C#CC# / help
12mo ago
✅ UNIQUE constraint failed
C#CC# / help
13mo ago
✅ where constraint on interface method
C#CC# / help
2y ago
❔ Unique Constraint Failed EF core
C#CC# / help
4y ago