public PartialViewResult BorrowBook_LoadBooks(int id, string bookDetails, bool autocompleteSource = false) { var books = bf.FilterByType(BookType.Available, bookDetails, autocompleteSource); ViewBag.UserId = id; return(PartialView("_BorrowBook_LoadBooks", books)); }
public ActionResult Books(int id, BookType type, string search = "") { var collection = uow.BookCollectionRepository.GetById(id); if (collection == null) { return(RedirectToAction("Index")); } ViewBag.CollectionName = collection.Name; ViewBag.CollectionId = collection.CollectionId; ViewBag.BookType = type; var books = bf.FilterByType(id, type, search).ToLookup(b => b.Title); return(View("CollectionBooks", books)); }