示例#1
0
 public void TestInjectValues2()
 {
     Expression <Func <SampleEntity, SampleEntity2, bool> > condition = (x, y) => y.IntValue != x.IntValue && x.IntValue > 10;
     var parser = new ConditionParser <SampleEntity, SampleEntity2>();
     var result = parser.InjectValues(new SampleEntity {
         IntValue = 5
     }, condition);
 }
示例#2
0
 public void TestInjectValues3()
 {
     Expression <Func <SampleEntity, SampleEntity2, bool> > condition = (x, y) => y.IntValue != x.IntValue &&
                                                                        (x.DecimalNullableValue > y.DecimalNullableValue || x.StringValue == y.StringValue);
     var parser = new ConditionParser <SampleEntity, SampleEntity2>();
     var result = parser.InjectValues(new SampleEntity {
         IntValue             = 5,
         DecimalNullableValue = 100.0m,
         StringValue          = "Test"
     }, condition);
 }