public void DeteleCategories(List <CategoriesWM> webModelList)
 {
     try
     {
         _categoriesOperations.DeleteCategories(CategoriesMapping.MapToEntity(webModelList));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
 public void AddCategory(CategoriesWM webModel)
 {
     try
     {
         _categoriesOperations.AddCategory(CategoriesMapping.MapToEntity(webModel));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
 public List <CategoriesWM> GetAllCategories()
 {
     try
     {
         return(CategoriesMapping.MaptoWM(_categoriesOperations.GetAllCategories()));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
 public List <CategoriesWM> FindCategories(Expression <Func <Categories, bool> > predicate)
 {
     try
     {
         return(CategoriesMapping.MaptoWM(_categoriesOperations.FindCategories(predicate)));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
 public CategoriesWM GetCategory(int id)
 {
     try
     {
         return(CategoriesMapping.MaptoWM(_categoriesOperations.GetCategory(id)));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }