public ActionResult Listar() { try { var listLivros = new LivrariaNeg().Listar(); return(Json(listLivros, JsonRequestBehavior.AllowGet)); } catch (Exception) { throw; } }
public ActionResult Editar(int id) { try { var livro = new LivrariaNeg().GetById(id); //retorno em Json return(Json(livro, JsonRequestBehavior.AllowGet)); } catch (Exception) { throw; } }