protected override SqlPack Select(MemberExpression expression, SqlPack sqlPack) { sqlPack.SetTableAlias(expression.Member.DeclaringType.Name); var tableAlias = sqlPack.GetTableAlias(expression.Member.DeclaringType.Name); if (!string.IsNullOrWhiteSpace(tableAlias)) { tableAlias += "."; } sqlPack.SelectFields.Add(tableAlias + expression.Member.Name); return(sqlPack); }
protected override SqlPack OrderBy(MemberExpression expression, SqlPack sqlPack) { sqlPack.SetTableAlias(expression.Member.DeclaringType.Name); sqlPack += sqlPack.GetTableAlias(expression.Member.DeclaringType.Name) + "." + expression.Member.Name; return(sqlPack); }