public async Task <IActionResult> OnPost() { carroRepository.Atualizar(Carro); await carroRepository.Commit(); return(RedirectToPage("Index")); }
public IActionResult OnPost() { if (ModelState.IsValid) { carroRepository.Adicionar(Carro); carroRepository.Commit(); return(RedirectToPage("Index")); } else { return(Page()); } }
public IActionResult OnPostExcluir(int id) { carroRepository.Excluir(id); carroRepository.Commit(); return(RedirectToPage("Index")); }