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

C# RelationCollection类代码示例

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

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



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

示例1: 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


示例2: subjectAttributes

        public SelectList subjectAttributes(object selObjId)
        {
            if (m_subjectAttributes == null)
            {
                m_subjectAttributes = new AttributeCollection();
                RelationCollection rels = new RelationCollection(AttributeEntity.Relations.ContextEntityUsingContextId);
                PredicateExpression pe = new PredicateExpression(ContextFields.Name == "subject");
                SortExpression se = new SortExpression(AttributeFields.Name | SortOperator.Ascending);
                m_subjectAttributes.GetMulti(pe, 0, se, rels);
            }

            SelectList selList = new SelectList(m_subjectAttributes, "Id", "Name", selObjId);
            return selList;
        }
开发者ID:habibvirji,项目名称:Webinos-Platform,代码行数:14,代码来源:baseData.cs


示例3: GetByEvent

        public IList<Auction.Domain.Donor> GetByEvent(long eventId,
                                ref IAuctionTransaction trans)
        {
            using (var donors = new DonorCollection())
            {
                var relations = new RelationCollection {AuctionEventDonorEntity.Relations.DonorEntityUsingDonorId};
                var filter = new PredicateExpression { AuctionEventDonorFields.EventId == eventId };
                donors.GetMulti(filter, relations);

                return donors.Select(d => new Donor()
                {
                    Id = d.Id,
                    AccountId = d.AccountId,
                    Name = d.Name,
                    Notes = d.Notes,
                    Phone = d.Phone
                }).ToList();
            }
        }
开发者ID:danappleyard,项目名称:auction-csharp,代码行数:19,代码来源:DonorRepository.cs


示例4: GetLibraryDocuments

        public Document[] GetLibraryDocuments(string libraryName)
        {
            List<Document> docs = new List<Document>();

            PolicyDocumentCollection policyDocuments = new PolicyDocumentCollection();

            RelationCollection rels = new RelationCollection(PolicyDocumentEntity.Relations.LibraryEntityUsingLibraryId);

            PredicateExpression pe = new PredicateExpression(LibraryFields.Name == libraryName);

            SortExpression se = new SortExpression(PolicyDocumentFields.Name | SortOperator.Ascending);
            policyDocuments.GetMulti(pe, 0, se, rels);

            foreach (PolicyDocumentEntity doc in policyDocuments)
            {
                Document wdoc = new Document();
                wdoc.Name = doc.Name;
                wdoc.Id = doc.Id;
                docs.Add(wdoc);
            }

            return docs.ToArray();
        }
开发者ID:habibvirji,项目名称:Webinos-Platform,代码行数:23,代码来源:policyServer.asmx.cs


示例5: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "AspnetUser":
             toReturn.Add(Relations.AspnetUsersEntityUsingUserId);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:MonoSoftware,项目名称:MonoX-Data-Access-Layer,代码行数:16,代码来源:AuditInfoEntity.cs


示例6: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "SalesPerson":
					toReturn.Add(Relations.SalesPersonEntityUsingSalesPersonId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:tdhung80,项目名称:RawDataAccessBencher,代码行数:16,代码来源:SalesPersonQuotaHistoryEntity.cs


示例7: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "Address":
					toReturn.Add(Relations.AddressEntityUsingAddressId);
					break;
				case "AddressType":
					toReturn.Add(Relations.AddressTypeEntityUsingAddressTypeId);
					break;
				case "BusinessEntity":
					toReturn.Add(Relations.BusinessEntityEntityUsingBusinessEntityId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:ck-lee,项目名称:RawDataAccessBencher,代码行数:22,代码来源:BusinessEntityAddressEntity.cs


示例8: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "AspnetApplications":
             toReturn.Add(Relations.AspnetApplicationsEntityUsingApplicationId);
             break;
         case "NewsCategoryParent":
             toReturn.Add(Relations.NewsCategoryEntityUsingIdNewsCategoryId);
             break;
         case "NewsCategoryChildrens":
             toReturn.Add(Relations.NewsCategoryEntityUsingNewsCategoryId);
             break;
         case "NewsCategoryInRoles":
             toReturn.Add(Relations.NewsCategoryInRoleEntityUsingNewsCategoryId);
             break;
         case "NewsCategoryLocalizations":
             toReturn.Add(Relations.NewsCategoryLocalizationEntityUsingNewsCategoryId);
             break;
         case "NewsItems":
             toReturn.Add(Relations.NewsItemEntityUsingNewsCategoryId);
             break;
         case "SnRelationshipss":
             toReturn.Add(Relations.SnRelationshipEntityUsingNewsCategoryId);
             break;
         case "NewsCategoryTemplate":
             toReturn.Add(Relations.NewsCategoryTemplateEntityUsingId);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:MonoSoftware,项目名称:MonoX-Data-Access-Layer,代码行数:37,代码来源:NewsCategoryEntity.cs


示例9: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "Contact":
					toReturn.Add(Relations.ContactEntityUsingContactId);
					break;
				case "Employee":
					toReturn.Add(Relations.EmployeeEntityUsingEmployeeIdManagerId);
					break;
				case "Employees":
					toReturn.Add(Relations.EmployeeEntityUsingManagerId);
					break;
				case "EmployeeAddresses":
					toReturn.Add(Relations.EmployeeAddressEntityUsingEmployeeId);
					break;
				case "EmployeeDepartmentHistories":
					toReturn.Add(Relations.EmployeeDepartmentHistoryEntityUsingEmployeeId);
					break;
				case "EmployeePayHistories":
					toReturn.Add(Relations.EmployeePayHistoryEntityUsingEmployeeId);
					break;
				case "JobCandidates":
					toReturn.Add(Relations.JobCandidateEntityUsingEmployeeId);
					break;
				case "PurchaseOrderHeaders":
					toReturn.Add(Relations.PurchaseOrderHeaderEntityUsingEmployeeId);
					break;
				case "SalesPerson":
					toReturn.Add(Relations.SalesPersonEntityUsingSalesPersonId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:perbrage,项目名称:RawDataAccessBencher,代码行数:40,代码来源:EmployeeEntity.cs


示例10: 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


示例11: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "ProductModel":
					toReturn.Add(Relations.ProductModelEntityUsingProductModelId);
					break;
				case "ProductSubcategory":
					toReturn.Add(Relations.ProductSubcategoryEntityUsingProductSubcategoryId);
					break;
				case "UnitMeasure":
					toReturn.Add(Relations.UnitMeasureEntityUsingSizeUnitMeasureCode);
					break;
				case "UnitMeasure_":
					toReturn.Add(Relations.UnitMeasureEntityUsingWeightUnitMeasureCode);
					break;
				case "BillOfMaterials":
					toReturn.Add(Relations.BillOfMaterialEntityUsingComponentId);
					break;
				case "BillOfMaterials_":
					toReturn.Add(Relations.BillOfMaterialEntityUsingProductAssemblyId);
					break;
				case "ProductCostHistories":
					toReturn.Add(Relations.ProductCostHistoryEntityUsingProductId);
					break;
				case "ProductDocuments":
					toReturn.Add(Relations.ProductDocumentEntityUsingProductId);
					break;
				case "ProductInventories":
					toReturn.Add(Relations.ProductInventoryEntityUsingProductId);
					break;
				case "ProductListPriceHistories":
					toReturn.Add(Relations.ProductListPriceHistoryEntityUsingProductId);
					break;
				case "ProductProductPhotos":
					toReturn.Add(Relations.ProductProductPhotoEntityUsingProductId);
					break;
				case "ProductReviews":
					toReturn.Add(Relations.ProductReviewEntityUsingProductId);
					break;
				case "ProductVendors":
					toReturn.Add(Relations.ProductVendorEntityUsingProductId);
					break;
				case "PurchaseOrderDetails":
					toReturn.Add(Relations.PurchaseOrderDetailEntityUsingProductId);
					break;
				case "ShoppingCartItems":
					toReturn.Add(Relations.ShoppingCartItemEntityUsingProductId);
					break;
				case "SpecialOfferProducts":
					toReturn.Add(Relations.SpecialOfferProductEntityUsingProductId);
					break;
				case "TransactionHistories":
					toReturn.Add(Relations.TransactionHistoryEntityUsingProductId);
					break;
				case "WorkOrders":
					toReturn.Add(Relations.WorkOrderEntityUsingProductId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:ck-lee,项目名称:RawDataAccessBencher,代码行数:67,代码来源:ProductEntity.cs


示例12: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "Person":
             toReturn.Add(Relations.PersonEntityUsingPersonId);
             break;
         case "ArtworkToRoles":
             toReturn.Add(Relations.ArtworkToRoleEntityUsingRoleId);
             break;
         case "RoleToEpisodes":
             toReturn.Add(Relations.RoleToEpisodeEntityUsingRoleId);
             break;
         case "RoleToSeasons":
             toReturn.Add(Relations.RoleToSeasonEntityUsingRoleId);
             break;
         case "RoleToSeries":
             toReturn.Add(Relations.RoleToSeriesEntityUsingRoleId);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:MichelZ,项目名称:TVJunkie,代码行数:28,代码来源:RoleEntity.cs


示例13: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static new RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "Message":
             toReturn.Add(Relations.MessageEntityUsingMessageID);
             break;
         default:
             toReturn = AuditDataCoreEntity.GetRelationsForField(fieldName);
             break;
     }
     return toReturn;
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:17,代码来源:AuditDataMessageRelatedEntityBase.cs


示例14: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "CountryRegion":
					toReturn.Add(Relations.CountryRegionEntityUsingCountryRegionCode);
					break;
				case "Currency":
					toReturn.Add(Relations.CurrencyEntityUsingCurrencyCode);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:ck-lee,项目名称:RawDataAccessBencher,代码行数:19,代码来源:CountryRegionCurrencyEntity.cs


示例15: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "ForumRoleForumActionRights":
             toReturn.Add(Relations.ForumRoleForumActionRightEntityUsingActionRightID);
             break;
         case "RoleSystemActionRights":
             toReturn.Add(Relations.RoleSystemActionRightEntityUsingActionRightID);
             break;
         case "SystemRightAssignedToRoles":
             toReturn.Add(Relations.RoleSystemActionRightEntityUsingActionRightID, "ActionRightEntity__", "RoleSystemActionRight_", JoinHint.None);
             toReturn.Add(RoleSystemActionRightEntity.Relations.RoleEntityUsingRoleID, "RoleSystemActionRight_", string.Empty, JoinHint.None);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:23,代码来源:ActionRightEntityBase.cs


示例16: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "Employee":
					toReturn.Add(Relations.EmployeeEntityUsingEmployeeId);
					break;
				case "ShipMethod":
					toReturn.Add(Relations.ShipMethodEntityUsingShipMethodId);
					break;
				case "Vendor":
					toReturn.Add(Relations.VendorEntityUsingVendorId);
					break;
				case "PurchaseOrderDetails":
					toReturn.Add(Relations.PurchaseOrderDetailEntityUsingPurchaseOrderId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:ck-lee,项目名称:RawDataAccessBencher,代码行数:25,代码来源:PurchaseOrderHeaderEntity.cs


示例17: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "AspnetRole":
             toReturn.Add(Relations.AspnetRolesEntityUsingRoleId);
             break;
         case "NewsCategory":
             toReturn.Add(Relations.NewsCategoryEntityUsingNewsCategoryId);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:MonoSoftware,项目名称:MonoX-Data-Access-Layer,代码行数:19,代码来源:NewsCategoryInRoleEntity.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: GetRelationsForField

		/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
		/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
		/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
		internal static RelationCollection GetRelationsForField(string fieldName)
		{
			RelationCollection toReturn = new RelationCollection();
			switch(fieldName)
			{
				case "ProductInventories":
					toReturn.Add(Relations.ProductInventoryEntityUsingLocationId);
					break;
				case "WorkOrderRoutings":
					toReturn.Add(Relations.WorkOrderRoutingEntityUsingLocationId);
					break;
				default:
					break;				
			}
			return toReturn;
		}
开发者ID:ck-lee,项目名称:RawDataAccessBencher,代码行数:19,代码来源:LocationEntity.cs


示例20: GetRelationsForField

 /// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
 /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
 /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
 internal static RelationCollection GetRelationsForField(string fieldName)
 {
     RelationCollection toReturn = new RelationCollection();
     switch(fieldName)
     {
         case "Language":
             toReturn.Add(Relations.LanguageEntityUsingLanguageId);
             break;
         case "Page":
             toReturn.Add(Relations.PageEntityUsingPageId);
             break;
         default:
             break;
     }
     return toReturn;
 }
开发者ID:MonoSoftware,项目名称:MonoX-Data-Access-Layer,代码行数:19,代码来源:PageLocalizationEntity.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# RelationPredicateBucket类代码示例发布时间:2022-05-24
下一篇:
C# Relation类代码示例发布时间: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