hello mvc users,
i cant understand that error
The DELETE statement conflicted with the REFERENCE constraint "FK_dbo.Appointments_dbo.Patients_PatientId". The conflict occurred in database "ClinicDB", table "dbo.Appointments", column 'PatientId'.
The statement has been terminated. And
And in patient configuration class
there is code below
HasMany(p => p.Appointments)
.WithRequired(a => a.Patient)
.WillCascadeOnDelete(true);
what else ? anything
how to fix this prob?
Sundaram SubramanianPosted Jan 13, 2020, 5:42 AM
sonal malhotraPosted Jan 13, 2020, 5:07 AM
sonal malhotraPosted Jan 13, 2020, 4:55 AM
sonal malhotraPosted Jan 13, 2020, 4:45 AM
Sundaram SubramanianPosted Jan 13, 2020, 4:43 AM
sonal malhotraPosted Jan 13, 2020, 4:42 AM
Sundaram SubramanianPosted Jan 13, 2020, 4:40 AM
sonal malhotraPosted Jan 13, 2020, 4:35 AM
Sundaram SubramanianPosted Jan 13, 2020, 3:51 AM
sonal malhotraPosted Jan 13, 2020, 3:49 AM
Sundaram SubramanianPosted Jan 13, 2020, 3:45 AM