// GET: Autores public async Task <IActionResult> Index(string filter, int page = 1, string sortExpression = "Nome") { var list = _context.List(filter); var model = PagingList.Create(list, 5, page, sortExpression, "Titulo"); model.RouteValue = new RouteValueDictionary { { "filter", filter } }; return(View(model)); }
public ActionResult <IEnumerable <Autor> > GetAutores() { var list = _context.List(); return(Ok(list)); }