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