示例#1
0
 public bool DeleteService(int id)
 {
     try
     {
         var data = _context.tbl_service.Where(x => x.idservice == id).FirstOrDefault();
         data.isactive = false;
         _context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
 public bool DeleteCustomer(int id)
 {
     try
     {
         var data = _context.tbl_customer.Where(x => x.idcustomer == id).FirstOrDefault();
         data.isactive = false;
         _context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }