Skip to content

Commit 5ce61cf

Browse files
authored
Update MySearchController.cs
1 parent 66d2b5a commit 5ce61cf

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

CS/EFCore/ComplexSearchEF/ComplexSearchEF.Module/Controllers/MySearchController.cs

-9
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,17 @@
55
using MySolution.Module.BusinessObjects;
66

77
namespace dxTestSolution.Module.Controllers {
8-
98
public class MySearchController : ObjectViewController<DetailView, MySearchClass> {
109
public MySearchController() {
1110
var myAction1 = new SimpleAction(this, "MySearch", "MySearchCategory");
1211
myAction1.Execute += MyAction1_Execute;
13-
1412
}
15-
1613
private void MyAction1_Execute(object sender, SimpleActionExecuteEventArgs e) {
1714
var mySearchObject = (MySearchClass)View.CurrentObject;
18-
1915
var persistentOS = Application.CreateObjectSpace(typeof(Contact));
2016
var criterion = CriteriaOperator.FromLambda<Contact>(x => x.FirstName.Contains(mySearchObject.FirstName) || x.Age == mySearchObject.Age);
21-
2217
var results = persistentOS.GetObjects<Contact>(criterion);
23-
2418
mySearchObject.SetContacts(results);
25-
2619
}
27-
28-
2920
}
3021
}

0 commit comments

Comments
 (0)