• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IEntityCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IEntityCollection的典型用法代码示例。如果您正苦于以下问题:C# IEntityCollection类的具体用法?C# IEntityCollection怎么用?C# IEntityCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IEntityCollection类属于命名空间,在下文中一共展示了IEntityCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RelationMemberTests

 public RelationMemberTests()
 {
     Mock<IEntityCollection<IOsmGeometry>> _nodesCollectionM = new Mock<IEntityCollection<IOsmGeometry>>();
     _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(new Node(1, 1.1, 2.2));
     _nodesCollectionM.Setup(c => c.Contains(1, EntityType.Node)).Returns(true);
     _nodesEntityCollection = _nodesCollectionM.Object;
 }
开发者ID:najira,项目名称:spatiallite-net,代码行数:7,代码来源:RelationMemberTests.cs


示例2: WayTests

 public WayTests()
 {
     Mock<IEntityCollection<IOsmGeometry>> _nodesCollectionM = new Mock<IEntityCollection<IOsmGeometry>>();
     _nodesCollectionM.SetupGet(c => c[1, EntityType.Node]).Returns(_nodes[0]);
     _nodesCollectionM.SetupGet(c => c[2, EntityType.Node]).Returns(_nodes[1]);
     _nodesCollectionM.SetupGet(c => c[3, EntityType.Node]).Returns(_nodes[2]);
     _nodesEntityCollection = _nodesCollectionM.Object;
 }
开发者ID:najira,项目名称:spatiallite-net,代码行数:8,代码来源:WayTests.cs


示例3: BindableGrid

 public BindableGrid(string id, IEntityCollection dataCollection)
 {
     this.ID = id;
     this.Value = null;
     this.Collection = dataCollection;
     if (this.Collection != null && this.Collection.IDbTable.PrimaryKey.Count > 0)
         this.ColumnName = this.Collection.IDbTable.PrimaryKey[0].ColumnName;
 }
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:8,代码来源:BindableGrid.cs


示例4: GetMultiUsingRolesWithAuditAction

 /// <summary>Retrieves in the calling AuditActionCollection object all AuditActionEntity objects which are related via a relation of type 'm:n' with the passed in RoleEntity.</summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingRolesWithAuditAction(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity roleInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
 {
     RelationCollection relations = new RelationCollection();
     relations.Add(AuditActionEntity.Relations.RoleAuditActionEntityUsingAuditActionID, "RoleAuditAction_");
     relations.Add(RoleAuditActionEntity.Relations.RoleEntityUsingRoleID, "RoleAuditAction_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(roleInstance.Fields[(int)RoleFieldIndex.RoleID], ComparisonOperator.Equal));
     return this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize);
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:20,代码来源:AuditActionDAO.cs


示例5: BulkInsert

        public void BulkInsert(IConnectionProvider conn, IEntityCollection newEntities, IEntityDaoFactory daoFactory)
        {
            if (newEntities.Count == 0)
                return;

            DataTable newRecords = newEntities.ToDataTable();
            var bulkCopy = BuildSqlBulkCopy(conn, newEntities.IDbTable.TableName, newRecords);
            bulkCopy.WriteToServer(newRecords);
        }
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:9,代码来源:SqlServerBulkSaver.cs


示例6: ProductCollection

        /// <summary>
        /// Initializes a new instance of the <see cref="ProductCollection"/> class.
        /// </summary>
        /// <param name="entityCollection">
        /// The <see cref="IEntityCollection"/>.
        /// </param>
        /// <exception cref="Exception">
        /// Throws an exception if the <see cref="IEntityCollection"/> is not a product collection
        /// </exception>
        internal ProductCollection(IEntityCollection entityCollection)
        {
            Mandate.ParameterNotNull(entityCollection, "entityCollection");
            if (entityCollection.EntityTfKey != Core.Constants.TypeFieldKeys.Entity.ProductKey)
            {
                throw new Exception("Must be a product collection");
            }

            this._entityCollection = entityCollection;
        }
开发者ID:jlarc,项目名称:Merchello,代码行数:19,代码来源:ProductCollection.cs


示例7: EntityCollectionProxyBase

        /// <summary>
        /// Initializes a new instance of the <see cref="EntityCollectionProxyBase"/> class.
        /// </summary>
        /// <param name="collection">
        /// The collection.
        /// </param>
        protected EntityCollectionProxyBase(IEntityCollection collection)
        {
            this.Key = collection.Key;
            this.ParentKey = collection.ParentKey;
            this.ProviderKey = collection.ProviderKey;
            this.SortOrder = collection.SortOrder;
            this.Name = collection.Name;
            this.ExtendedData = collection.ExtendedData;

            this.Initialize(collection.ProviderKey);
        }
开发者ID:rustyswayne,项目名称:Merchello,代码行数:17,代码来源:EntityCollectionProxyBase.cs


示例8: GetMulti

 /// <summary>Retrieves in the calling MembershipCollection object all MembershipEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="roleInstance">RoleEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="storeInformationInstance">StoreInformationEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity roleInstance, IEntity storeInformationInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(ProductSearchEngine.EntityType.MembershipEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(roleInstance, storeInformationInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
开发者ID:fahrigoktuna,项目名称:ProductSearchEngine,代码行数:22,代码来源:MembershipDAO.cs


示例9: GetMulti

 /// <summary>Retrieves in the calling ForumCollection object all ForumEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="sectionInstance">SectionEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="defaultSupportQueueInstance">SupportQueueEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity sectionInstance, IEntity defaultSupportQueueInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(SD.HnD.DAL.EntityType.ForumEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(sectionInstance, defaultSupportQueueInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:22,代码来源:ForumDAO.cs


示例10: EntityFilterGroup

 /// <summary>
 /// Initializes a new instance of the <see cref="EntityFilterGroup"/> class.
 /// </summary>
 /// <param name="collection">
 /// The collection.
 /// </param>
 public EntityFilterGroup(IEntityCollection collection)
     : base(collection.EntityTfKey, collection.ProviderKey)
 {
     this.ParentKey = collection.ParentKey;
     this.Key = collection.Key;
     this.CreateDate = collection.CreateDate;
     this.UpdateDate = collection.UpdateDate;
     this.Name = collection.Name;
     this.IsFilter = collection.IsFilter;
     this.ExtendedData = collection.ExtendedData;
     this.SortOrder = collection.SortOrder;
     this.Filters = new EntityFilterCollection();
     this.ResetDirtyProperties();
 }
开发者ID:rustyswayne,项目名称:Merchello,代码行数:20,代码来源:EntityFilterGroup.cs


示例11: BulkSave

        public void BulkSave(IConnectionProvider conn, IEntityCollection entitiesToSave, IEntityDaoFactory daoFactory)
        {
            IEntityCollection newEntities, changedEntities, removedEntities;
            SplitCollectionForInsertUpdateAndDeleteOperations(entitiesToSave, out newEntities, out changedEntities, out removedEntities);

            bool connIsLocal = !conn.IsOpen;
            if (connIsLocal)
                conn.OpenConnection();

            try
            {
                BulkInsert(conn, newEntities, daoFactory);
                BulkUpdate(conn, changedEntities, daoFactory);
                BulkDelete(conn, removedEntities, daoFactory);
            }
            finally
            {
                if (connIsLocal)
                    conn.CloseConnection();
            }
        }
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:21,代码来源:SqlServerBulkSaver.cs


示例12: SplitCollectionForInsertUpdateAndDeleteOperations

 private static void SplitCollectionForInsertUpdateAndDeleteOperations(IEntityCollection entitiesToSave, out IEntityCollection newEntities, out IEntityCollection changedEntities, out IEntityCollection removedEntities)
 {
     IDbTable table = entitiesToSave.IDbTable;
     newEntities = table.NewEntityCollection();
     changedEntities = table.NewEntityCollection();
     removedEntities = table.NewEntityCollection();
     foreach (IEntity entity in entitiesToSave)
     {
         switch (entity.EntityState)
         {
             case EntityState.New:
                 newEntities.Add(entity);
                 break;
             case EntityState.OutOfSync:
                 changedEntities.Add(entity);
                 break;
             case EntityState.PendingDeletion:
                 removedEntities.Add(entity);
                 break;
         }
     }
 }
开发者ID:lordfist,项目名称:FistCore.Lib,代码行数:22,代码来源:SqlServerBulkSaver.cs


示例13: ExportEntityCollection

        // Exports an IEntityCollection to a table in given Document. BookmarkName is the name of the bookmark associated
        // with the table.
        public static dynamic ExportEntityCollection(string DocumentPath, string BookmarkName, int StartRow, bool BuildColumnHeadings, IEntityCollection collection, List<string> ColumnNames)
        {
            dynamic functionReturnValue = null;
            List<ColumnMapping> mappings = new List<ColumnMapping>();
            ColumnMapping map = default(ColumnMapping);

            dynamic doc = null;
            WordHelper wordProxy = new WordHelper();

            // if Word is active then use it
            if (!wordProxy.GetWord())
            {
                if (!wordProxy.CreateWord())
                {
                    throw new System.Exception("Could not start Microsoft Word.");
                }
            }

            wordProxy.OpenDocument(DocumentPath);
            doc = wordProxy.Document;

            foreach (string name in ColumnNames)
            {
                map = new ColumnMapping("", name);
                map.TableField.DisplayName = name;
                mappings.Add(map);
            }

            functionReturnValue = ExportEntityCollection(doc, BookmarkName, StartRow, BuildColumnHeadings, collection, mappings);
            wordProxy.ShowDocument();
            return functionReturnValue;
        }
开发者ID:sjnaughton,项目名称:OfficeSharp,代码行数:34,代码来源:Word.cs


示例14: Convert

 private IProductCollection Convert(IEntityCollection ec)
 {
     return new ProductCollection(ec);
 }
开发者ID:rustyswayne,项目名称:Merchello,代码行数:4,代码来源:ProductCollectionTreeTests.cs


示例15: VisitEntityCollection

 protected override void VisitEntityCollection(IEntityCollection entityCollection, PropertyInfo propertyInfo)
 {
     if (propertyInfo.GetCustomAttributes(typeof(CompositionAttribute), false).Any())
     {
         bool lastIsChild = this._isChild;
         this._isChild = true;
         IEnumerable<Entity> children = entityCollection.Entities;
         foreach (Entity child in children)
         {
             this.Visit(child);
         }
         this._isChild = lastIsChild;
     }
 }
开发者ID:kouweizhong,项目名称:openair,代码行数:14,代码来源:ChangeSetBuilder.cs


示例16: GetMultiUsingDecisionNodeCollectionViaRule

 /// <summary>
 /// Retrieves in the calling EffectCollection object all EffectEntity objects
 /// which are related via a relation of type 'm:n' with the passed in DecisionNodeEntity. 
 /// </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="decisionNodeInstance">DecisionNodeEntity object to be used as a filter in the m:n relation</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingDecisionNodeCollectionViaRule(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity decisionNodeInstance, int pageNumber, int pageSize)
 {
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(policyDB.EntityType.EffectEntity);
     RelationCollection relations = new RelationCollection();
     relations.Add(EffectEntity.Relations.RuleEntityUsingEffectId, "Rule_");
     relations.Add(RuleEntity.Relations.DecisionNodeEntityUsingConditionId, "Rule_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(decisionNodeInstance.Fields[(int)DecisionNodeFieldIndex.Id], ComparisonOperator.Equal));
     return GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize);
 }
开发者ID:habibvirji,项目名称:Webinos-Platform,代码行数:24,代码来源:EffectDAO.cs


示例17: ToEntityCollection

        /// <summary>
        /// Maps a <see cref="EntityCollectionDisplay"/> to an <see cref="IEntityCollection"/>.
        /// </summary>
        /// <param name="display">
        /// The display.
        /// </param>
        /// <param name="destination">
        /// The destination.
        /// </param>
        /// <returns>
        /// The <see cref="IEntityCollection"/>.
        /// </returns>
        public static IEntityCollection ToEntityCollection(
            this EntityCollectionDisplay display,
            IEntityCollection destination)
        {
            if (!Guid.Empty.Equals(display.Key)) destination.Key = display.Key;
            destination.Name = display.Name;
            destination.ProviderKey = display.ProviderKey;
            destination.EntityTfKey = display.EntityTfKey;
            destination.ParentKey = display.ParentKey.GetValueOrDefault();
            ((EntityCollection)destination).SortOrder = display.SortOrder;

            return destination;
        }
开发者ID:jlarc,项目名称:Merchello,代码行数:25,代码来源:EntityCollectionDisplay.cs


示例18: GetMultiUsingRoleCollectionViaUser

 /// <summary>
 /// Retrieves in the calling AccountCollection object all AccountEntity objects
 /// which are related via a relation of type 'm:n' with the passed in RoleEntity. 
 /// </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingRoleCollectionViaUser(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity roleInstance, int pageNumber, int pageSize)
 {
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Auction.Entities.EntityType.AccountEntity);
     RelationCollection relations = new RelationCollection();
     relations.Add(AccountEntity.Relations.UserEntityUsingAccountId, "User_");
     relations.Add(UserEntity.Relations.RoleEntityUsingRoleId, "User_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(roleInstance.Fields[(int)RoleFieldIndex.Id], ComparisonOperator.Equal));
     return GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, pageNumber, pageSize);
 }
开发者ID:danappleyard,项目名称:auction-csharp,代码行数:24,代码来源:AccountDAO.cs


示例19: GetMultiUsingUsersWhoStartedThreads

 /// <summary>Retrieves in the calling ForumCollection object all ForumEntity objects which are related via a relation of type 'm:n' with the passed in UserEntity.</summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="userInstance">UserEntity object to be used as a filter in the m:n relation</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingUsersWhoStartedThreads(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity userInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
 {
     RelationCollection relations = new RelationCollection();
     relations.Add(ForumEntity.Relations.ThreadEntityUsingForumID, "Thread_");
     relations.Add(ThreadEntity.Relations.UserEntityUsingStartedByUserID, "Thread_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(userInstance.Fields[(int)UserFieldIndex.UserID], ComparisonOperator.Equal));
     return this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize);
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:20,代码来源:ForumDAO.cs


示例20: GetMultiUsingUserCollectionViaDonor_

 /// <summary>
 /// Retrieves in the calling AccountCollection object all AccountEntity objects
 /// which are related via a relation of type 'm:n' with the passed in UserEntity. 
 /// </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="userInstance">UserEntity object to be used as a filter in the m:n relation</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingUserCollectionViaDonor_(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity userInstance, IPrefetchPath prefetchPathToUse)
 {
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Auction.Entities.EntityType.AccountEntity);
     RelationCollection relations = new RelationCollection();
     relations.Add(AccountEntity.Relations.DonorEntityUsingAccountId, "Donor_");
     relations.Add(DonorEntity.Relations.UserEntityUsingUpdatedBy, "Donor_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(userInstance.Fields[(int)UserFieldIndex.Id], ComparisonOperator.Equal));
     return GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse);
 }
开发者ID:danappleyard,项目名称:auction-csharp,代码行数:23,代码来源:AccountDAO.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEntityFactory类代码示例发布时间:2022-05-24
下一篇:
C# IEntityBase类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap