Exemple #1
0
        public static EntityMemberPath GetEntityMemberPath(EntityJoinInfo joinInfo)
        {
            List <string> pathList = new List <string> {
                joinInfo.Property.Name
            };
            var entityMemberPath = new EntityMemberPath()
            {
                Path = pathList
            };

            return(entityMemberPath);
        }
Exemple #2
0
        public static EntityMemberPath GetEntityMemberPath(MemberExpression expression)
        {
            List <string>    pathList = new List <string>();
            MemberExpression exp      = expression;

            do
            {
                pathList.Add(exp.Member.Name);
                exp = exp.Expression as MemberExpression;
            } while (exp != null);

            pathList.Reverse();
            var entityMemberPath = new EntityMemberPath()
            {
                Path = pathList
            };

            return(entityMemberPath);
        }