public ActionResult Detalhes(int id)
 {
     var emprestimoAplicao = new EmprestimoAplicacao();
     var emprestimo = emprestimoAplicao.ListarPorId(id);
     if (emprestimo == null)
         return HttpNotFound();
     return View(emprestimo);
 }
        public ActionResult Editar(int id)
        {
            var emprestimoAplicacao = new EmprestimoAplicacao();
            var produto = emprestimoAplicacao.ListarPorId(id);
            if (produto == null)
                return HttpNotFound();

            return View(produto);
        }
 public ActionResult Cadastrar(Emprestimo emprestimo)
 {
     if (ModelState.IsValid)
     {
         var produtoAplicacao = new EmprestimoAplicacao();
         produtoAplicacao.Salvar(emprestimo);
         return RedirectToAction("Index");
     }
     return View(emprestimo);
 }
 public ActionResult Index()
 {
     var emprestimoAplicacao = new EmprestimoAplicacao();
     return View(emprestimoAplicacao.ListarTodos());
 }
 public ActionResult ExcluirConfirmado(int id)
 {
     var emprestimoAplicacao = new EmprestimoAplicacao();
     emprestimoAplicacao.Excluir(id);
     return RedirectToAction("Index");
 }