Example #1
0
        public async Task Create(CategoryRequestModel request)
        {
            var category = _mapper.Map <CategoryEntity>(request);

            if (category.Invalid)
            {
                _notificationService.AddEntityNotification(category.ValidationResult);
                return;
            }
            await _categoryRepository.Create(category);
        }