public static EntityMemberPath GetEntityMemberPath(EntityJoinInfo joinInfo) { List <string> pathList = new List <string> { joinInfo.Property.Name }; var entityMemberPath = new EntityMemberPath() { Path = pathList }; return(entityMemberPath); }
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); }