public IActionResult Editar(int idAnuncio) { BuscarAnuncioResponse response = _applicationTesteWebMotorsService.BuscarAnuncio(idAnuncio); AnuncioView accView = response.AnuncioView; return(View(accView)); }
public BuscarAnuncioResponse BuscarAnuncio(int idAnuncio) { Anuncio anuncio = new Anuncio(); anuncio.Id = idAnuncio; Anuncio anuncioRetorno = _servicoAnuncio.ConsultarUnico(anuncio); BuscarAnuncioResponse buscarAnuncioResponse = new BuscarAnuncioResponse(); buscarAnuncioResponse.AnuncioView = new AnuncioView() { Ano = anuncioRetorno.Ano, Id = anuncioRetorno.Id, Marca = anuncioRetorno.Marca, Modelo = anuncioRetorno.Modelo, Observacao = anuncioRetorno.Observacao, Quilometragem = anuncioRetorno.Quilometragem, Versao = anuncioRetorno.Versao }; return(buscarAnuncioResponse); }