コード例 #1
0
        public IActionResult EndpointGetLeilaoById(int id)
        {
            var leilao = _dao.BuscarLeilaoPorId(id);

            if (leilao == null)
            {
                return(NotFound());
            }
            return(Ok(leilao));
        }
コード例 #2
0
        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));
        }