public ActionResult Find() { var vm = new UsersFindViewModel(); vm.Users = db.Users.ToList(); return(View(vm)); }
public ActionResult Find(UsersFindViewModel model) { model.Users = db.Users.Where(u => u.Email.Contains(model.Query)).ToList(); return(View(model)); }