// // GET: /Report/ public ActionResult Index() { using(var client = new ApiRef.StoreClient()) { return View(client.GetReport()); } }
public ActionResult Details(int id) { using (var client = new ApiRef.StoreClient()) { var model = client.GetBook(id); return View(model); } }
public ActionResult Create(Book book) { try { using (var client = new ApiRef.StoreClient()) { client.PostBook(book); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(int id, FormCollection c) { try { using (var client = new ApiRef.StoreClient()) { client.DeleteBook(id); } return RedirectToAction("Index"); } catch { return View(); } }