Esempio n. 1
0
 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();
         }
     }
 }
Esempio n. 2
0
 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();
         }
     }
 }
Esempio n. 3
0
 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();
         }
     }
 }
Esempio n. 4
0
 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();
         }
     }
 }