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)); }
public async Task <ActionResult <Leilao> > PostLeilao(Leilao leilao) { await _facade.CreateLeilao(leilao); return(CreatedAtAction(nameof(GetLeilao), new { id = leilao.LeilaoId }, leilao)); }