Beispiel #1
0
 public CarpentryServiceType GetCarpentryServiceTypeDetails(int id)
 {
     try
     {
         CarpentryServiceType carpentryServiceType = db.CarpentryServiceType.Find(id);
         return(carpentryServiceType);
     }
     catch
     {
         throw;
     }
 }
Beispiel #2
0
 public int UpdateCarpentryServiceType(CarpentryServiceType carpentryServiceType)
 {
     try
     {
         db.Entry(carpentryServiceType).State = EntityState.Modified;
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Beispiel #3
0
 public int AddCarpentryServiceType(CarpentryServiceType carpentryServiceType)
 {
     try
     {
         db.CarpentryServiceType.Add(carpentryServiceType);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Beispiel #4
0
 public int DeleteCarpentryServiceType(int id)
 {
     try
     {
         CarpentryServiceType carpentryServiceType = db.CarpentryServiceType.Find(id);
         db.CarpentryServiceType.Remove(carpentryServiceType);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }