private DbExpression CreateMemberExpression(TranslationContext context, PropertyInfo property, DbExpression subaccess) { Type type = property.PropertyType; return(subaccess.GetOrSetChildren(property, () => { DbExpression item = null; if (type.IsPrimary()) { item = new DbMemberExpression(property, subaccess); } else if (type.IsComplexCollection()) { item = new DbCollectionMemberExpression(context, property, subaccess); } else { item = new DbObjectMemberExpression(context, property, subaccess); } return item; })); }
/// <summary> /// 创建对象内容表达式。 /// </summary> /// <param name="member">对象成员引用表达式。</param> public DbUnitObjectContentExpression(DbObjectMemberExpression member) : base(((System.Reflection.PropertyInfo)member.Member).PropertyType) { Content = member; }