public ActionResult Edit(Emprestimo emprestimo) { if (ModelState.IsValid) { emprestimo.CadastrarDevolucao(emprestimo); return(View("Extrato", emprestimo)); } return(View(emprestimo)); }
public ActionResult Edit([Bind(Include = "id,dataDevolucao,dataAluguel,dataPrevistaDevolucao,clienteId, livroId")] Emprestimo emprestimo) { if (ModelState.IsValid) { emprestimo.CadastrarDevolucao(emprestimo); return(View("Extrato", emprestimo)); } return(View(emprestimo)); }