public IActionResult Index() { var model = new AutorIndexViewModel(); var autores = _autoresData.GetAll(); return((IActionResult)autores); }
public IEnumerable <Autor> GetAutores() { var model = new AutorIndexViewModel(); var autores = _autoresData.GetAll(); return(autores); }
public IActionResult Index() { var model = new AutorIndexViewModel(); model.Autors = _autorsData.GetAllAutors(); model.AutorCurrentMessage = "Autor Current Message"; return(View(model)); }
// GET: AutorController public ActionResult Index(AutorIndexViewModel autorIndexRequest) { var autores = _autorRepository .GetAll(autorIndexRequest.OrderAscendant, autorIndexRequest.Search) .ToList(); var autorIndexViewModel = new AutorIndexViewModel { Search = autorIndexRequest.Search, Autores = autores, OrderAscendant = autorIndexRequest.OrderAscendant }; return(View(autorIndexViewModel)); }