public async Task <Guid> Handle(CreateCategoryCommand request, CancellationToken cancellationToken) { try { var entity = _mapper.Map <Category>(request.Category); return(await _repository.Insert(entity, cancellationToken)); } catch (Exception e) { throw new CreateException(e); } }