public ViewResult Index(string criterio) { //var temas = context.Temas.Include(a=>a.Categorias.Select(o=>o.Categoria)).AsQueryable(); //if (!string.IsNullOrEmpty(criterio)) // temas = temas.Where(o => o.Nombre.Contains(criterio)); var temas = temaService.GetTemasWithCriterio(criterio); ViewBag.Criterio = criterio; return(View(temas.ToList())); }