public FabricType GetFabricTypeDetails(int id) { try { FabricType fabricType = db.FabricType.Find(id); return(fabricType); } catch { throw; } }
public int UpdateFabricType(FabricType fabricType) { try { db.Entry(fabricType).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }
public int AddFabricType(FabricType fabricType) { try { db.FabricType.Add(fabricType); db.SaveChanges(); return(1); } catch { throw; } }
public int DeleteFabricType(int id) { try { FabricType fabricType = db.FabricType.Find(id); db.FabricType.Remove(fabricType); db.SaveChanges(); return(1); } catch { throw; } }