Patient.DivHospitalID (FK)
DivHospital.HospitalID (FK)
Hospital.HospitalID (PK)
I need to insert into DivHospital the Hospital and link/insert into Patient the DivHospital.
Patient tp = new Patient();
DivHospital dh = new DivHospital();
dh.HospitalReference.EntityKey =
new EntityKey("transportPagerEntities.Hospital", "hospitalID", hospital);
tp.DivHospitalReference.EntityKey = new
EntityKey("transportPagerEntities.DivHospital", "divHospitalID", hospitalref);
context.AddToDivHospital(dh);
context.AddToTransportPatient(tp);
context.SaveChanges();