public IActionResult EndpointGetLeilaoById(int id) { var leilao = _dao.BuscarLeilaoPorId(id); if (leilao == null) { return(NotFound()); } return(Ok(leilao)); }
public IActionResult Edit(int id) { ViewData["Categorias"] = _dao.BuscarTodasCategorias(); ViewData["Operacao"] = "Edição"; var leilao = _dao.BuscarLeilaoPorId(id); if (leilao == null) { return(NotFound()); } return(View("Form", leilao)); }