This commit is contained in:
sunkaixuan
2017-05-25 02:07:49 +08:00
parent afa236da5a
commit c3d1d8b7db
2 changed files with 19 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ namespace OrmTest.UnitTest
whereSingle5();
whereSingle6();
whereSingle7(new Student() { Id = 1 });
//whereSingle8(new Student() { Id = 1 });
WhereMultiple1();
WhereMultiple2();
@@ -150,6 +151,18 @@ namespace OrmTest.UnitTest
new SugarParameter("@Id0",1)
}, "whereSingle7");
}
private void whereSingle8(Student st)
{
Expression<Func<Student, bool>> exp = it => it.Name == null;
ExpressionContext expContext = new ExpressionContext();
expContext.Resolve(exp, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
base.Check(value, pars, "( [Name] is @Id0 )", new List<SugarParameter>() {
new SugarParameter("@Id0",1)
}, "whereSingle8");
}
}
public class WhereConst