예제 #1
0
            public async Task <Result <int> > Handle(DeleteGenderCommand command, CancellationToken cancellationToken)
            {
                var category = await _categoryRepository.GetByIdAsync(command.Id);

                await _categoryRepository.DeleteAsync(category);

                await _unitOfWork.Commit(cancellationToken);

                return(Result <int> .Success(category.Id));
            }