public ActionResult List() { using (var db = new XkSystem.Models.DbContext()) { var vm = new Models.SysConfig.List(); var tb = from p in db.Table <Sys.Entity.tbSysConfig>() select p; if (string.IsNullOrEmpty(vm.SearchText) == false) { tb = tb.Where(d => d.Title.Contains(vm.SearchText)); } vm.SysConfigList = (from p in tb orderby p.No select p).ToList(); return(View(vm)); } }
public ActionResult List(Models.SysConfig.List vm) { return(Code.MvcHelper.Post(null, Url.Action("List", new { searchText = vm.SearchText }))); }