This commit is contained in:
sunkaixuan
2017-09-07 17:03:01 +08:00
parent 1f6030d74a
commit 3a12bf55fa
6 changed files with 75 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ namespace OrmTest.UnitTest
base.Begin();
for (int i = 0; i < base.Count; i++)
{
whereSingle25();
whereSingle24();
whereSingle23();
whereSingle22();
@@ -390,6 +391,19 @@ namespace OrmTest.UnitTest
new SugarParameter("@Datetime10",DateTime.Now.Date)
}, "whereSingle24");
}
private void whereSingle25()
{
var p = DateTime.Now;
Expression<Func<DataTestInfo, bool>> exp = it => it.Datetime1.Date > p.Date;
SqlServerExpressionContext expContext = new SqlServerExpressionContext();
expContext.Resolve(exp, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
base.Check(value, pars, "( [Datetime1] > @Datetime10 )", new List<SugarParameter>()
{
new SugarParameter("@Datetime10",DateTime.Now.Date)
}, "whereSingle24");
}
}
public class WhereConst