mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-01 19:03:58 +08:00
-
This commit is contained in:
22
OrmTest/ExpressionTest/Field.cs
Normal file
22
OrmTest/ExpressionTest/Field.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using OrmTest.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest.ExpressionTest
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
internal static void Init()
|
||||
{
|
||||
Expression<Func<Student, object>> exp = it=>it.Name;
|
||||
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.FieldMultiple);
|
||||
expContext.Resolve();
|
||||
var selectorValue = expContext.Result.GetString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user