SqlSugar/OrmTest/ExpressionTest/Select.cs

23 lines
619 B
C#
Raw Normal View History

2017-01-14 15:16:20 +08:00
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 Select
{
internal static void Init()
{
Expression<Func<Student, object>> exp = it => new Program() { x = it.Name };
ExpressionContext expContext = new ExpressionContext(exp, ResolveExpressType.WhereSingle);
expContext.ResolveType = ResolveExpressType.SelectSingle;
2017-01-14 18:00:20 +08:00
var x = expContext.Result;
2017-01-14 15:16:20 +08:00
}
}
}