public void DeleteClient(Client client) { using (var db = new MedicModel()) { try { db.Entry(client.User).State = EntityState.Deleted; db.Entry(client).State = EntityState.Deleted; db.SaveChanges(); } finally { db.Dispose(); } } }
public void DeleteAnalizeBlood(AnalizeBlood AnalizeBlood) { using (var db = new MedicModel()) { try { db.Entry(AnalizeBlood.Analizi).State = EntityState.Deleted; db.Entry(AnalizeBlood).State = EntityState.Deleted; db.SaveChanges(); } finally { db.Dispose(); } } }
public void UpdateLaborant(Laborant Laborant) { using (var db = new MedicModel()) { try { db.Entry(Laborant.User).State = EntityState.Modified; db.Entry(Laborant).State = EntityState.Modified; db.SaveChanges(); } finally { db.Dispose(); } } }
public void UpdateAnalizeShit(AnalizeShit AnalizeShit) { using (var db = new MedicModel()) { try { db.Entry(AnalizeShit.Analizi).State = EntityState.Modified; db.Entry(AnalizeShit).State = EntityState.Modified; db.SaveChanges(); } finally { db.Dispose(); } } }