This commit is contained in:
sunkaixuan
2017-01-14 23:21:25 +08:00
parent a81934027d
commit 829883d2cb
12 changed files with 13 additions and 1 deletions

View File

@@ -13,7 +13,19 @@ namespace OrmTest.ExpressionTest
{ {
internal static void Init() internal static void Init()
{ {
Expression<Func<Student, object>> exp = it=>it.Name; FieldSingle();
FieldMultiple();
}
private static void FieldSingle()
{
Expression<Func<Student, object>> exp = it => it.Name;
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.FieldSingle);
expContext.Resolve();
var selectorValue = expContext.Result.GetString();
}
private static void FieldMultiple()
{
Expression<Func<Student, object>> exp = it => it.Name;
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.FieldMultiple); ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.FieldMultiple);
expContext.Resolve(); expContext.Resolve();
var selectorValue = expContext.Result.GetString(); var selectorValue = expContext.Result.GetString();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.