public async Task <IActionResult> UpdateDealer([FromBody] UpdateDealerDto data) { var command = new UpdateDealerCommand(data); var result = await _mediator.Send(command); return(result.ErrorMessage == string.Empty ? (IActionResult)Ok() : NotFound(result.ErrorMessage)); }
public UpdateDealerCommand(UpdateDealerDto dealer) { Dealer = dealer; }