Пример #1
0
 public async Task<ActionResult> CreateSave(Book book)
 {
     book.id = Guid.NewGuid();
     new BookAPI().add(book);
     return RedirectToAction("Index");
 }
Пример #2
0
 public async Task<ActionResult> EditSave(Book book)
 {
     new BookAPI().update(book);
     return RedirectToAction("Index");
 }
Пример #3
0
 public ActionResult Create(Book book)
 {
     ViewBag.Authors = new AuthorAPI().get();
     ViewBag.Categories = new CategoryAPI().get();
     return View();
 }