public void ChangeStatus(Guid id, ChangeTaskStatusRequestModel changeTaskStatusRequest) { if (Version == -1) { throw BaseException.NotFoundException("Task Not Found!"); } Apply(new ChangeTaskStatusModel { Id = id, UpdatedBy = changeTaskStatusRequest.UpdatedBy, Status = (int)changeTaskStatusRequest.Status, Version = Version }); }
public ChangeTaskStatusRequest(Guid id, ChangeTaskStatusRequestModel changeTaskStatusRequestModel) { Id = id; ChangeTaskStatusRequestModel = changeTaskStatusRequestModel; }
public async Task <IActionResult> ChangeTaskStatus([FromRoute] Guid id, [FromBody] ChangeTaskStatusRequestModel changeTaskStatusRequest) { var response = await _mediator.Send(new ChangeTaskStatusRequest(id, changeTaskStatusRequest)); return(ApiUpdated(response)); }