Пример #1
0
        public async Task <IActionResult> Create([Bind("LeilaoId,Categoria,CategoriaDeLance,Preco,DataInicio,DataFinal,IdUsuarioResponsavel")] Leilao leilao)
        {
            if (ModelState.IsValid)
            {
                await _facade.CreateLeilao(leilao);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(leilao));
        }
Пример #2
0
        public async Task <ActionResult <Leilao> > PostLeilao(Leilao leilao)
        {
            await _facade.CreateLeilao(leilao);

            return(CreatedAtAction(nameof(GetLeilao), new { id = leilao.LeilaoId }, leilao));
        }