This commit is contained in:
sunkaixuan
2017-09-03 01:46:56 +08:00
parent ee4878a983
commit 47e0f1007d
4 changed files with 24 additions and 1 deletions

View File

@@ -74,10 +74,25 @@ namespace OrmTest.UnitTest
Replace();
Length();
Time();
Test1();
}
base.End("Method Test");
}
private void Test1()
{
var ids = new int[] { 1, 2, 3 };
Expression<Func<Student, bool>> exp = it => ids.Contains(it.Id)&&!SqlFunc.IsNullOrEmpty(it.Name);
SqlServerExpressionContext expContext = new SqlServerExpressionContext();
expContext.Resolve(exp, ResolveExpressType.WhereSingle);
var value = expContext.Result.GetString();
var pars = expContext.Parameters;
base.Check(value, pars, "(([Id] IN ('1','2','3')) AND NOT( [Name]='' OR [Name] IS NULL ))", new List<SugarParameter>() {
}, "Test1 error");
}
private void ExtendToString()
{
Expression<Func<Student, bool>> exp = it => it.Id.ToString() == "a";