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


C# DataAccessAdapterBase.FetchEntityCollection方法代码示例

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


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

示例1: FetchTrgovanjeGlavaForGuiDisplay

        public static TrgovanjeGlavaEntity FetchTrgovanjeGlavaForGuiDisplay(DataAccessAdapterBase adapter, DateTime date)
        {
            RelationPredicateBucket bucket = new RelationPredicateBucket();
            bucket.PredicateExpression.Add(TrgovanjeGlavaFields.Datum <= date.Date);

            SortExpression sort = new SortExpression(TrgovanjeGlavaFields.Datum | SortOperator.Descending);

            EntityCollection<TrgovanjeGlavaEntity> trgovanjeGlavaCollection = new EntityCollection<TrgovanjeGlavaEntity>(new TrgovanjeGlavaEntityFactory());
            adapter.FetchEntityCollection(trgovanjeGlavaCollection, bucket, 1, sort);

            if (0 == trgovanjeGlavaCollection.Count)
            {
                sort = new SortExpression(TrgovanjeGlavaFields.Datum | SortOperator.Ascending);
                adapter.FetchEntityCollection(trgovanjeGlavaCollection, null, 1, sort);
            }

            return FetchTrgovanjeGlavaForGuiDisplay(adapter, trgovanjeGlavaCollection.Single().TrgovanjeGlavaId);
        }
开发者ID:vjerch,项目名称:TN,代码行数:18,代码来源:TrgovanjeGlavaEntity.cs

示例2: FetchRepoAukcijaDateCollection

        public static List<DateTime> FetchRepoAukcijaDateCollection(DataAccessAdapterBase adapter)
        {
            if (null == _repoAukcijaDateCollection)
            {
                EntityCollection<RepoAukcijaEntity> repoAukcijaEntityCollection = new EntityCollection<RepoAukcijaEntity>(new RepoAukcijaEntityFactory());
                ExcludeIncludeFieldsList includeFieldList = new ExcludeIncludeFieldsList(false);
                includeFieldList.Add(RepoAukcijaFields.DatumAukcije);

                adapter.FetchEntityCollection(repoAukcijaEntityCollection, includeFieldList, null);

                _repoAukcijaDateCollection = repoAukcijaEntityCollection.OrderByDescending(ra => ra.DatumAukcije).Select(ra => ra.DatumAukcije).ToList();
            }

            return _repoAukcijaDateCollection;
        }
开发者ID:vjerch,项目名称:TN,代码行数:15,代码来源:RepoAukcijaEntity.cs

示例3: FetchErrorCollectionForPaging

        /// <summary>
        /// Efficient pageing for grid.
        /// </summary>
        /// <param name="pageNumber">Must be greater than zero.</param>
        /// <param name="sortDirection">Validne vrijednosti su 'asc' i 'desc'.</param>
        public static EntityCollection<ErrorEntity> FetchErrorCollectionForPaging(DataAccessAdapterBase adapter,
			RelationPredicateBucket bucket,
			PrefetchPath2 prefetchPath,
            int pageNumber,
            int pageSize,
            string sortField,
			bool isSortAscending)
        {
            string sortDirection = isSortAscending ? "asc" : "desc";

            Type sortEntityFieldType = typeof(ErrorFields);
            string sortEntityFieldTypeName = SortHelper.GetEntityFieldTypeNameForSorting(sortField, sortEntityFieldType);
            if (!string.IsNullOrWhiteSpace(sortEntityFieldTypeName))
            {
                sortEntityFieldType = Type.GetType(sortEntityFieldTypeName);
            }

            sortField = SortHelper.GetSortField(sortField);

            SortExpression sort = SortHelper.GetSortExpression(sortField, sortDirection, sortEntityFieldType);

            EntityCollection<ErrorEntity> toReturn = new EntityCollection<ErrorEntity>(new ErrorEntityFactory());
            adapter.FetchEntityCollection(toReturn, bucket, pageSize, sort, prefetchPath, pageNumber, pageSize);

            return toReturn;
        }
开发者ID:vjerch,项目名称:TN,代码行数:31,代码来源:ErrorEntity.cs

示例4: FetchErrorCollection

        public static EntityCollection<ErrorEntity> FetchErrorCollection(DataAccessAdapterBase adapter,
			IRelationPredicateBucket filterBucket,
			PrefetchPath2 prefetchPath)
        {
            EntityCollection<ErrorEntity> toReturn = new EntityCollection<ErrorEntity>(new ErrorEntityFactory());
            adapter.FetchEntityCollection(toReturn, filterBucket, prefetchPath);
            return toReturn;
        }
开发者ID:vjerch,项目名称:TN,代码行数:8,代码来源:ErrorEntity.cs

示例5: FetchSistemskaInstancaPodatakaRoCollection

        public static EntityCollection<SistemskaInstancaPodatakaRoEntity> FetchSistemskaInstancaPodatakaRoCollection(DataAccessAdapterBase adapter,
			IRelationPredicateBucket filterBucket,
			PrefetchPath2 prefetchPath)
        {
            EntityCollection<SistemskaInstancaPodatakaRoEntity> toReturn = new EntityCollection<SistemskaInstancaPodatakaRoEntity>(new SistemskaInstancaPodatakaRoEntityFactory());
            adapter.FetchEntityCollection(toReturn, filterBucket, prefetchPath);
            return toReturn;
        }
开发者ID:vjerch,项目名称:TN,代码行数:8,代码来源:SistemskaInstancaPodatakaRoEntity.cs

示例6: LoadTrgovanjeGodinaList

        private static void LoadTrgovanjeGodinaList(DataAccessAdapterBase adapter)
        {
            EntityCollection<TrgovanjeGlavaEntity> trgovanjeGlavaCollection = new EntityCollection<TrgovanjeGlavaEntity>(new TrgovanjeGlavaEntityFactory());

            ExcludeIncludeFieldsList includeFieldList = new ExcludeIncludeFieldsList(false);
            includeFieldList.Add(TrgovanjeGlavaFields.Datum);

            adapter.FetchEntityCollection(trgovanjeGlavaCollection, includeFieldList, null);

            _godinaTrgovanjaCollection = trgovanjeGlavaCollection.Select(tg => tg.Datum.Year).Distinct().ToList();

            _godinaTrgovanjaCollection.Sort();
        }
开发者ID:vjerch,项目名称:TN,代码行数:13,代码来源:TrgovanjeGlavaEntity.cs

示例7: LoadTrgovanjeGlavaPrethodniDan

        public void LoadTrgovanjeGlavaPrethodniDan(DataAccessAdapterBase adapter)
        {
            RelationPredicateBucket bucket = new RelationPredicateBucket();
            bucket.PredicateExpression.Add(TrgovanjeGlavaFields.Datum < this.Datum);

            PrefetchPath2 prefetchPath = new PrefetchPath2(EntityType.TrgovanjeGlavaEntity);
            prefetchPath.Add(TrgovanjeGlavaEntity.PrefetchPathTrgovanjeStavkaCollection);

            SortExpression sort = new SortExpression(TrgovanjeGlavaFields.Datum | SortOperator.Descending);

            EntityCollection<TrgovanjeGlavaEntity> trgovanjeGlavaCollection = new EntityCollection<TrgovanjeGlavaEntity>(new TrgovanjeGlavaEntityFactory());
            adapter.FetchEntityCollection(trgovanjeGlavaCollection, bucket, 1, sort, prefetchPath);

            _trgovanjeGlavaPrethodniDan = trgovanjeGlavaCollection.SingleOrDefault();
        }
开发者ID:vjerch,项目名称:TN,代码行数:15,代码来源:TrgovanjeGlavaEntity.cs


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