public void Query() { var models = fakedb.GetStudentByName(Search); GridModelList = new ObservableCollection <Student>(); if (models != null) { models.ForEach(arg => { GridModelList.Add(arg); }); } }