Esempio n. 1
0
 private Core.Entities.WorkTask ToDomainEntity(CreateWorkTaskRequest request)
 {
     return(new Core.Entities.WorkTask(
                _workTaskRepository.GenerateNewIdentity(),
                request.ProjectId,
                request.Type,
                request.Name,
                request.StoryPoints,
                request.Description,
                request.ParentTask,
                request.ChildTasks,
                new Identity[0],
                request.Steps,
                request.Documents));
 }
Esempio n. 2
0
        public ConfirmationResponse Execute(AddCommentRequest request)
        {
            request.ThrowExceptionIfInvalid();

            var task = _workTaskRepository.Read(request.WorkTaskId);

            var comment = new Core.Entities.WorkTask.Comment(
                _workTaskRepository.GenerateNewIdentity(),
                request.AuthorId,
                task.Id,
                request.Content);

            _workTaskRepository.AddComment(comment);

            return(new ConfirmationResponse("Comment added successfully.")
            {
                Id = task.Id,
            });
        }