mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-06 05:37:58 +08:00
35 lines
978 B
C#
35 lines
978 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SqlSugar
|
|
{
|
|
internal class ExpressionItems
|
|
{
|
|
/// <summary>
|
|
/// 1 memeber, 2 class ,3 method
|
|
/// </summary>
|
|
public int Type { get; set; }
|
|
public EntityInfo ParentEntityInfo { get; set; }
|
|
public EntityInfo ThisEntityInfo { get; set; }
|
|
public Expression Expression { get; set; }
|
|
public Navigate Nav
|
|
{
|
|
get
|
|
{
|
|
if (Expression is MemberExpression)
|
|
{
|
|
var name = (Expression as MemberExpression).Member.Name;
|
|
var navColumn = ParentEntityInfo.Columns.FirstOrDefault(it => it.PropertyName == name);
|
|
return navColumn == null ? null : navColumn.Navigat;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|