Beispiel #1
0
        public ActionResult AuthorSearch(string symbols)
        {
            List <AuthorModel> model;

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

            return(PartialView("~/Views/LibrarianPage/_AuthorSearch.cshtml", model));
        }
Beispiel #2
0
        public ActionResult BooksByAuthor()
        {
            List <AuthorModel> model;

            librarianContext = new LibrarianPage(context);
            model            = librarianContext.Authors().Select(c => (AuthorModel)c).ToList();
            return(PartialView("~/Views/LibrarianPage/_BooksByAuthor.cshtml", model));
        }