public static void Edit(RepairCauseEstimate model)
 {
     using (DataContext db = new DataContext())
     {
         db.Entry(model).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
 public static void Create(RepairCauseEstimate model)
 {
     using (DataContext db = new DataContext())
     {
         db.RepairCauseEstimates.Add(model);
         db.SaveChanges();
     }
 }
 public static void Delete(Guid id)
 {
     using (DataContext db = new DataContext())
     {
         RepairCauseEstimate model = db.RepairCauseEstimates.Find(id);
         db.RepairCauseEstimates.Remove(model);
         db.SaveChanges();
     }
 }