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)); }
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)); }