예제 #1
0
 public JoinParseInfo CloneTo(QueryIdentifier @alias)
 {
     return(new JoinParseInfo()
     {
         TargetProperty = TargetProperty,
         Alias = @alias,
         Columns = Columns.Select(e => new ColumnInfo(e.ColumnName, @alias, e._container)).ToArray(),
         DependingJoins = DependingJoins.Select(e => e.CloneTo(@alias)).ToArray(),
         TargetTableType = TargetTableType,
         SourceTable = SourceTable,
         SourceColumnName = new ColumnInfo(SourceColumnName.ColumnName, SourceColumnName, alias, SourceColumnName._container),
         TargetColumnName = new ColumnInfo(TargetColumnName.ColumnName, TargetColumnName, alias, TargetColumnName._container)
     });
 }
예제 #2
0
 public JoinParseInfo CloneForJoinTo(
     QueryIdentifier alias,
     IList <ColumnInfo> columnSource,
     IEnumerable <ColumnInfo> originalColumnSource)
 {
     return(new JoinParseInfo()
     {
         TargetProperty = TargetProperty,
         Alias = @alias,
         Columns = Columns.Select(e => columnSource.First(f => f.AliasOf.Equals(e))).ToArray(),
         DependingJoins = DependingJoins.Select(e => e.CloneForJoinTo(@alias, columnSource, originalColumnSource)).ToArray(),
         TargetTableType = TargetTableType,
         SourceTable = @alias,
         SourceColumnName = Columns.FirstOrDefault(f => f.AliasOf?.Equals(SourceColumnName) == true) ?? SourceColumnName,
         TargetColumnName = Columns.FirstOrDefault(f => f.AliasOf?.Equals(TargetColumnName) == true) ?? TargetColumnName
                            //SourceColumnName = SourceColumnName,
                            //TargetColumnName = TargetColumnName
     });
 }