Example #1
0
        public JsonResult FindBook(string id)
        {
            //Create new book object and populate it, if a book can be found with a matching isbn
            Book book = new Book();
            book.SelectById(id);

            //Return the book, all vars will be null if the isbn wasn't found
            return Json(book, JsonRequestBehavior.AllowGet);
        }