public async Task <IActionResult> Put(int id, [FromBody] UpdateTaskCmd cmd, [FromServices] ICommandHandlerAsync <UpdateTaskCmd> handler) { if (!ModelState.IsValid) { var errors = GetErrors(); throw new CustomException((int)ExceptionCode.Validation, errors); } cmd.Validate(); cmd.Id = id; await this._dispatcher.PushAsync(handler, cmd); _logger.LogInformation($"Update Task with id = {id}"); return(Json(new Json(cmd.Result))); }
public virtual Task <ActionResult> UpdateTask(UpdateTaskCmd updateTaskCmd) { processEngine.UpdateTask(updateTaskCmd); return(Task.FromResult <ActionResult>(Ok())); }
public virtual Task <bool> UpdateTask(UpdateTaskCmd updateTaskCmd) { processEngine.UpdateTask(updateTaskCmd); return(Task.FromResult(true)); }
/// <inheritdoc /> public async Task <bool> UpdateTask(UpdateTaskCmd updateTaskCmd) { return(await httpProxy.PostAsync <bool>($"{serviceUrl}/update", updateTaskCmd).ConfigureAwait(false)); }