public async Task <Guid> Handle(CreateGoalCommand request, CancellationToken cancellationToken) { var goal = new Goal(request.Title, request.Description, request.CreatedBy, request.AimDate); await _goalsRepository.Add(goal); await _goalsRepository.UnitOfWork.SaveEntitiesAsync(); return(goal.Id); }