public ActionResult ShowReadingList(string username) { ListBooksModel list = new ListBooksModel(); var xxx = _db.ReadingLists.Where(i => i.UserName == username).ToList(); list.readinglist = _db.ReadingLists.Where(i => i.UserName == username).ToList(); list.kitaplar = _db.Kitaplar.ToList(); return(View(list)); }
public ViewResult List(string category, int count = 1) { ListBooksModel model = new ListBooksModel { Category = category, books = BooksRepository.GetBooks.Where(x => category == null || x.Category == category) .OrderBy(x => x.BookID).Skip((count) * countItem).Take(countItem), pageCofig = new PageModel { CountItem = BooksRepository.GetBooks.Count(), CountItemPage = countItem, numberPage = category == null?BooksRepository.GetBooks.Count() : BooksRepository.GetBooks.Where(x => x.Category == category).Count() } }; return(View(model)); }