Expression Bool Bug

This commit is contained in:
610262374@qq.com
2018-12-06 13:19:26 +08:00
parent 49501475fb
commit 4b05418d91
2 changed files with 19 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ namespace OrmTest.UnitTest
base.Begin();
for (int i = 0; i < base.Count; i++)
{
whereSingle31();
whereSingle30();
whereSingle29("22");
whereSingle28();
@@ -71,6 +72,19 @@ namespace OrmTest.UnitTest
}, "whereSingle30");
}
private void whereSingle31()
{
bool? b = false;
Expression<Func<DataTestInfo2, bool>> exp = it => it.Bool2== b.Value;
ExpressionContext expContext = new ExpressionContext();
expContext.Resolve(exp, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
base.Check(value, pars, "( [Bool2] = @Bool20 )", new List<SugarParameter>() {
new SugarParameter("@Bool20",false)
}, "whereSingle30");
}
public string Get28(string a) {
return a + "1";
}