// GET: KhowBase public ActionResult Index() { ViewKnowBase view = new ViewKnowBase() { Authoritys = KnowBaseRepository.Authoritys.ToList(), Services = KnowBaseRepository.Services.ToList(), ViewAuthoritys = KnowBaseRepository.ViewAuthorits.ToList() }; return(View(view)); }
public ActionResult Index(string search) { ViewKnowBase view = new ViewKnowBase() { Authoritys = KnowBaseRepository.Authoritys.Where(s => s.Name.IndexOf(search) > -1), Services = KnowBaseRepository.Services.ToList(), ViewAuthoritys = KnowBaseRepository.ViewAuthorits.ToList() }; ViewBag.Search = search; return(View(view)); }