public void AddLaborant(Laborant Laborant) { using (var db = new MedicModel()) { try { db.Laborants.Add(Laborant); db.SaveChanges(); } finally { db.Dispose(); } } }
public void AddClient(Client client) { using (var db = new MedicModel()) { try { db.Clients.Add(client); db.SaveChanges(); } finally { db.Dispose(); } } }
public void AddAnalizeBlood(AnalizeBlood AnalizeBlood) { using (var db = new MedicModel()) { try { db.AnalizeBloods.Add(AnalizeBlood); db.SaveChanges(); } finally { db.Dispose(); } } }
public void AddAnalizeShit(AnalizeShit AnalizeShit) { using (var db = new MedicModel()) { try { db.AnalizeShits.Add(AnalizeShit); db.SaveChanges(); } finally { db.Dispose(); } } }
public void AddAnalizeMocha(AnalizeMocha AnalizeMocha) { using (var db = new MedicModel()) { try { db.AnalizeMochas.Add(AnalizeMocha); db.SaveChanges(); } finally { db.Dispose(); } } }
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 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 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 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(); } } }
public List <Client> GetClients() { var list = new List <Client>(); MedicModel db = null; using (db = new MedicModel()) { try { list = db.Clients.Include(e => e.User).ToList(); } finally { db.Dispose(); }; } return(list); }
public List <Laboratory> GetLaboratories() { var list = new List <Laboratory>(); MedicModel db = null; using (db = new MedicModel()) { try { list = db.Laboratories.ToList(); } finally { db.Dispose(); }; } return(list); }
public List <AnalizeBlood> GetAnalizeBloods() { var list = new List <AnalizeBlood>(); MedicModel db = null; using (db = new MedicModel()) { try { list = db.AnalizeBloods.Include(e => e.Analizi.Client).Include(e => e.Analizi.Laborant).ToList(); } finally { db.Dispose(); }; } return(list); }