本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}