示例#1
0
        public SqlAnnotationsCollection <TTo> Map(SqlAnnotationsCollection <TFrom> holderFrom)
        {
            var holderTo = new SqlAnnotationsCollection <TTo>();

            foreach (var tableResult in holderFrom.TableAnnotationResults)
            {
                TTo to = Map(tableResult.Result);
                holderTo.AddTableAnnotation(tableResult.TableName, to);
            }

            foreach (var columnResult in holderFrom.ColumnAnnotationResults)
            {
                TTo to = Map(columnResult.Result);
                holderTo.AddColumnAnnotation(columnResult.TableName, columnResult.ColumnName, to);
            }

            return(holderTo);
        }
示例#2
0
        public SqlAnnotationsCollection <TTo> Map(SqlAnnotationsCollection <TFrom> holderFrom)
        {
            var holderTo = new SqlAnnotationsCollection <TTo>();

            foreach (var tableResult in holderFrom.TableAnnotationResults)
            {
                IEnumerable <TTo> toExpanded = Map(tableResult.Result);
                foreach (TTo to in toExpanded)
                {
                    holderTo.AddTableAnnotation(tableResult.TableName, to);
                }
            }

            foreach (var columnResult in holderFrom.ColumnAnnotationResults)
            {
                IEnumerable <TTo> toExpanded = Map(columnResult.Result);
                foreach (TTo to in toExpanded)
                {
                    holderTo.AddColumnAnnotation(columnResult.TableName, columnResult.ColumnName, to);
                }
            }

            return(holderTo);
        }