public async Task <ActionResult <eAnuncioWebMotors> > Update([FromBody] eAnuncioWebMotors AnuncioWebMotors) { try { var AnuncioUpdt = await _AnuncioWebMotorsRepo.Get(AnuncioWebMotors.ID); if (AnuncioUpdt == null) { return(NotFound()); } AnuncioUpdt.Update(AnuncioWebMotors); await _AnuncioWebMotorsRepo.Update(AnuncioUpdt); return(Ok()); } catch (Exception ex) { _logger.LogError(ex.Message); return(StatusCode(500)); } }
public void Update(AnuncioWebMotorsModel anuncioWebMotorsModel) { _anuncioWebMotorsRepository.Update(_mapper.Map <AnuncioWebMotors>(anuncioWebMotorsModel)); }