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