Esempio n. 1
0
 public CarpentryService GetCarpentryServiceDetails(int id)
 {
     try
     {
         CarpentryService carpentryService = db.CarpentryService.Find(id);
         return(carpentryService);
     }
     catch
     {
         throw;
     }
 }
Esempio n. 2
0
 public int AddCarpentryService(CarpentryService carpentryService)
 {
     try
     {
         db.CarpentryService.Add(carpentryService);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Esempio n. 3
0
 public int UpdateCarpentryService(CarpentryService carpentryService)
 {
     try
     {
         db.Entry(carpentryService).State = EntityState.Modified;
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Esempio n. 4
0
 public int DeleteCarpentryService(int id)
 {
     try
     {
         CarpentryService carpentryService = db.CarpentryService.Find(id);
         db.CarpentryService.Remove(carpentryService);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }