コード例 #1
0
        public BaseResponse <TaskAssigneeOutputDto> Create(TaskAssigneeInputDto taskAssignee)
        {
            var entity = Create(Mapper.Map <TaskAssignee>(taskAssignee), out var isSaved);

            if (!isSaved)
            {
                throw new BadRequestException("Could not assign task to member");
            }

            return(new SuccessResponse <TaskAssigneeOutputDto>(Mapper.Map <TaskAssigneeOutputDto>(entity)));
        }
コード例 #2
0
 public BaseResponse <TaskAssigneeOutputDto> Create([FromBody] TaskAssigneeInputDto taskAssignee)
 {
     return(_taskAssigneeService.Create(taskAssignee));
 }