public ActionResult List() { using (var db = new XkSystem.Models.DbContext()) { var vm = new Models.Blood.List(); var tb = db.Table <Dict.Entity.tbDictBlood>(); if (string.IsNullOrEmpty(vm.SearchText) == false) { tb = tb.Where(d => d.BloodName.Contains(vm.SearchText)); } vm.tbDictBloodList = tb.ToList(); return(View(vm)); } }
public ActionResult List(Models.Blood.List vm) { return(Code.MvcHelper.Post(null, Url.Action("List", new { searchText = vm.SearchText }))); }