コード例 #1
0
        public ViewResult Index(string searchString)
        {
            IEnumerable <Rule> depto = departamentoService.GetAllDepartamento();

            if (!String.IsNullOrEmpty(searchString))
            {
                depto = depto.Where(o => o.Name.ToUpper().Contains(searchString.ToUpper()));
            }

            return(View(depto));
        }