当前位置: 首页>>代码示例>>C#>>正文


C# ColumnCollection.Where方法代码示例

本文整理汇总了C#中ColumnCollection.Where方法的典型用法代码示例。如果您正苦于以下问题:C# ColumnCollection.Where方法的具体用法?C# ColumnCollection.Where怎么用?C# ColumnCollection.Where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ColumnCollection的用法示例。


在下文中一共展示了ColumnCollection.Where方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PrimaryKeys

        internal PrimaryKeys(ColumnCollection columns)
        {
            var pk = columns.Where(column => (column as ColumnSchema).PkContraintName != null);

            this.keys = pk.Select(column => column.ColumnName).ToArray();
            if (this.keys.Length != 0)
                this.constraintName = pk.Select(column => (column as ColumnSchema).PkContraintName).First();
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:8,代码来源:PrimaryKeys.cs

示例2: ComputedColumns

 internal ComputedColumns(ColumnCollection columns)
 {
     this.columnNames = columns.Where(column => column.IsComputed).Select(column => column.ColumnName).ToArray();
 }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:4,代码来源:ComputedColumns.cs

示例3: ForeignKeys

        public ForeignKeys(TableName tableName, ColumnCollection columns)
        {
            var fkeys = columns.Where(column => (column as ColumnSchema).FkContraintName != null).ToArray();
            this.keys = new ForeignKey[fkeys.Length];

            int i = 0;
            foreach (var fk in fkeys)
                this.keys[i++] = new ForeignKey(tableName, fk);
        }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:9,代码来源:ForeignKeys.cs

示例4: IdentityKeys

 internal IdentityKeys(ColumnCollection columns)
 {
     this.columnNames = columns.Where(column => column.IsIdentity).Select(column => column.ColumnName).ToArray();
 }
开发者ID:fjiang2,项目名称:sqlcon,代码行数:4,代码来源:IdentityKeys.cs

示例5: AggregatesToString

        /// <summary>
        /// Aggregateses to string.
        /// </summary>
        /// <param name="columns">The columns.</param>
        /// <returns>System.String.</returns>
        private string AggregatesToString(ColumnCollection columns)
        {
            var srcTree = new XDocument(new XElement("Root"));
            var root = srcTree.Element("Root");

            foreach (var column in columns.Where(c => c.GroupLevel == null))
            {
                if (column.AggregateCriteriaList != null && column.AggregateCriteriaList.Count > 0)
                {
                    var aggregate = new XElement("Aggregate");
                    root.Add(aggregate);

                    aggregate.Add(
                        new XElement(
                            "ColumnName",
                            string.Format(
                                CultureInfo.InvariantCulture,
                                "{0}",
                                string.Format(
                                    CultureInfo.InvariantCulture, "{0}{1}", string.IsNullOrEmpty(column.Prefix) ? string.Empty : column.Prefix + ".", column.ColumnName.Replace(" ", string.Empty)))));

                    var funcs = new XElement("AggregateFunctions");
                    aggregate.Add(funcs);

                    foreach (var func in column.AggregateCriteriaList)
                    {
                        var data = new XElement("Function");
                        funcs.Add(data);

                        data.Add(new XElement("ProcessName", ProcessSystemName ?? string.Empty));
                        data.Add(new XElement("SelectedColumn", func.ColumnName ?? string.Empty));
                        data.Add(new XElement("SummaryType", func.SummaryType.ToString() ?? string.Empty));
                        data.Add(new XElement("FilterId", FilterId.ToString(CultureInfo.InvariantCulture) ?? string.Empty));
                        data.Add(new XElement("CustomConverter", func.CustomConverter ?? string.Empty));
                        data.Add(new XElement("TargetType", func.TargetType ?? string.Empty));
                        data.Add(new XElement("TypeName", func.TypeName ?? string.Empty));
                        data.Add(new XElement("ConverterParameter", func.ConverterParameter ?? string.Empty));
                    }
                }
            }

            return srcTree.ToString();
        }
开发者ID:mparsin,项目名称:Elements,代码行数:48,代码来源:ReportViewerViewModel.cs


注:本文中的ColumnCollection.Where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。