File tree 1 file changed +0
-9
lines changed
CS/EFCore/ComplexSearchEF/ComplexSearchEF.Module/Controllers
1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 5
5
using MySolution . Module . BusinessObjects ;
6
6
7
7
namespace dxTestSolution . Module . Controllers {
8
-
9
8
public class MySearchController : ObjectViewController < DetailView , MySearchClass > {
10
9
public MySearchController ( ) {
11
10
var myAction1 = new SimpleAction ( this , "MySearch" , "MySearchCategory" ) ;
12
11
myAction1 . Execute += MyAction1_Execute ;
13
-
14
12
}
15
-
16
13
private void MyAction1_Execute ( object sender , SimpleActionExecuteEventArgs e ) {
17
14
var mySearchObject = ( MySearchClass ) View . CurrentObject ;
18
-
19
15
var persistentOS = Application . CreateObjectSpace ( typeof ( Contact ) ) ;
20
16
var criterion = CriteriaOperator . FromLambda < Contact > ( x => x . FirstName . Contains ( mySearchObject . FirstName ) || x . Age == mySearchObject . Age ) ;
21
-
22
17
var results = persistentOS . GetObjects < Contact > ( criterion ) ;
23
-
24
18
mySearchObject . SetContacts ( results ) ;
25
-
26
19
}
27
-
28
-
29
20
}
30
21
}
You can’t perform that action at this time.
0 commit comments