示例#1
0
 /// <summary>
 /// 2018/12/17 Vaishnavi Soni
 /// Add new product category
 /// </summary>
 /// <returns>int</returns>
 public int AddSubCategory(SubCategory categoryModel)
 {
     try
     {
         using (ShoppingCartEntities db = new ShoppingCartEntities())
         {
             var newCategory = db.STP_InsertSubCategories(categoryModel.CategoryId, categoryModel.SubCategoryName, DateTime.Now, categoryModel.CreatedBy, null, 0, true);
             db.SaveChanges();
             return(newCategory);
         }
     }
     catch (System.Exception ex)
     {
         objErrorLogger.ErrorLog(ex);
         throw ex;
     }
 }