//[HttpPost] //public string Index(string searchString, bool notused) //{ // return "From [HttpPost]Index: filter on " + searchString; //} // GET: Books/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var book = await booksService.GetBook(id); if (book == null) { return(NotFound()); } return(View(book)); }
// GET: Books/Create public async Task <IActionResult> Create(int?id) { var book = await booksService.GetBook(id); return(View(new Purchase(book))); }