示例#1
0
 public bool DeleteGPAUser(long userId)
 {
     try
     {
         var user = dbContext.GPAUsers.Find(userId);
         dbContext.Remove(user);
         dbContext.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
示例#2
0
 public bool DeletePharmacy(long pharmacyId)
 {
     try
     {
         var pharmacy = dbContext.Pharmacies.Find(pharmacyId);
         dbContext.Remove(pharmacy);
         dbContext.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
示例#3
0
 public bool DeleteMedicine(long medicineId)
 {
     try
     {
         var medicine = dbContext.Medicines.Find(medicineId);
         dbContext.Remove(medicine);
         dbContext.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }