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'.
Why?
Appointments are not really dependant![](https://utfs.io/f/1dd6dc09-61a0-4bde-a5ce-44c521ab6102-4pl4mu.png)
![](https://utfs.io/f/c92dee84-07e1-4c27-966f-da86ccd23248-4pl4mu.png)
0 Replies