Пример #1
0
 public int CreateCategory(beCategory categoryEntity)
 {
     try
     {
         using (var scope = new TransactionScope())
         {
             var category = new Category
             {
                 UserId           = categoryEntity.UserId,
                 CategoryName     = categoryEntity.CategoryName,
                 Type             = categoryEntity.Type,
                 IsActive         = categoryEntity.IsActive,
                 ParentCategoryId = categoryEntity.ParentCategoryId
             };
             _unitOfWork.CategoryRepository.Insert(category);
             _unitOfWork.Save();
             scope.Complete();
             return(category.Id);
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #2
0
 public bool UpdateCategory(int categoryId, beCategory categoryEntity)
 {
     throw new NotImplementedException();
 }