public async Task <IActionResult> ExcluirModelo(long modeloId) { var cmd = new ExcluirModeloCommand(modeloId); await _mediator.Send(cmd); await _uow.SaveEntitiesAsync(); return(Ok()); }
public async Task <IActionResult> Delete(int id) { var command = new ExcluirModeloCommand() { Id = id }; if (await _mediator.Send(command)) { return(Ok()); } else { return(NotFound()); } }