Beispiel #1
0
        public ActionResult BooksByAuthor()
        {
            List <AuthorModel> model;

            readerContext = new ReaderPage(context);
            model         = readerContext.Authors().Select(c => (AuthorModel)c).ToList();
            return(PartialView("~/Views/ReaderPage/_BooksByAuthor.cshtml", model));
        }
Beispiel #2
0
        public ActionResult AuthorSearch(string symbols)
        {
            List <AuthorModel> model;

            model = readerContext.Authors().Where(c => c.Surname.Contains(symbols) || c.Name.Contains(symbols) || c.Patronymic.Contains(symbols))
                    .Select(c => (AuthorModel)c).ToList();

            return(PartialView("~/Views/ReaderPage/_AuthorSearch.cshtml", model));
        }