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


C# EntitySet类代码示例

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


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

示例1: CountryRegion

		/// <summary>Initializes a new instance of the <see cref="CountryRegion"/> class.</summary>
		public CountryRegion()
		{
			_countryRegionCurrencies = new EntitySet<CountryRegionCurrency>(new Action<CountryRegionCurrency>(this.Attach_CountryRegionCurrencies), new Action<CountryRegionCurrency>(this.Detach_CountryRegionCurrencies) );
			_salesTerritories = new EntitySet<SalesTerritory>(new Action<SalesTerritory>(this.Attach_SalesTerritories), new Action<SalesTerritory>(this.Detach_SalesTerritories) );
			_stateProvinces = new EntitySet<StateProvince>(new Action<StateProvince>(this.Attach_StateProvinces), new Action<StateProvince>(this.Detach_StateProvinces) );
			OnCreated();
		}
开发者ID:tdhung80,项目名称:RawDataAccessBencher,代码行数:8,代码来源:CountryRegion.cs

示例2: ProductModel

		/// <summary>Initializes a new instance of the <see cref="ProductModel"/> class.</summary>
		public ProductModel()
		{
			_products = new EntitySet<Product>(new Action<Product>(this.Attach_Products), new Action<Product>(this.Detach_Products) );
			_productModelIllustrations = new EntitySet<ProductModelIllustration>(new Action<ProductModelIllustration>(this.Attach_ProductModelIllustrations), new Action<ProductModelIllustration>(this.Detach_ProductModelIllustrations) );
			_productModelProductDescriptionCultures = new EntitySet<ProductModelProductDescriptionCulture>(new Action<ProductModelProductDescriptionCulture>(this.Attach_ProductModelProductDescriptionCultures), new Action<ProductModelProductDescriptionCulture>(this.Detach_ProductModelProductDescriptionCultures) );
			OnCreated();
		}
开发者ID:tdhung80,项目名称:RawDataAccessBencher,代码行数:8,代码来源:ProductModel.cs

示例3: RbEmergencyPlaceReceptionCall

 public RbEmergencyPlaceReceptionCall()
 {
     this._EmergencyCalls = new EntitySet<EmergencyCall>(new Action<EmergencyCall>(this.attach_EmergencyCalls), new Action<EmergencyCall>(this.detach_EmergencyCalls));
     this._Person_CreatePersonId  = default(EntityRef<Person>);
     this._Person_ModifyPersonId  = default(EntityRef<Person>);
     OnCreated();
 }
开发者ID:vvboborykin,项目名称:VistaMedTools,代码行数:7,代码来源:S11DataContext.RbEmergencyPlaceReceptionCall.Generated.cs

示例4: RbHospitalBedType

 public RbHospitalBedType()
 {
     this._OrgStructureHospitalBeds = new EntitySet<OrgStructureHospitalBed>(new Action<OrgStructureHospitalBed>(this.attach_OrgStructureHospitalBeds), new Action<OrgStructureHospitalBed>(this.detach_OrgStructureHospitalBeds));
     this._Person_CreatePersonId  = default(EntityRef<Person>);
     this._Person_ModifyPersonId  = default(EntityRef<Person>);
     OnCreated();
 }
开发者ID:vvboborykin,项目名称:VistaMedTools,代码行数:7,代码来源:S11DataContext.RbHospitalBedType.Generated.cs

示例5: CurrencyRate

		/// <summary>Initializes a new instance of the <see cref="CurrencyRate"/> class.</summary>
		public CurrencyRate()
		{
			_currency = default(EntityRef<Currency>);
			_currency1 = default(EntityRef<Currency>);
			_salesOrderHeaders = new EntitySet<SalesOrderHeader>(new Action<SalesOrderHeader>(this.Attach_SalesOrderHeaders), new Action<SalesOrderHeader>(this.Detach_SalesOrderHeaders) );
			OnCreated();
		}
开发者ID:modulexcite,项目名称:LinqToSQL2,代码行数:8,代码来源:CurrencyRate.cs

示例6: WorkOrder

		/// <summary>Initializes a new instance of the <see cref="WorkOrder"/> class.</summary>
		public WorkOrder()
		{
			_product = default(EntityRef<Product>);
			_scrapReason = default(EntityRef<ScrapReason>);
			_workOrderRoutings = new EntitySet<WorkOrderRouting>(new Action<WorkOrderRouting>(this.Attach_WorkOrderRoutings), new Action<WorkOrderRouting>(this.Detach_WorkOrderRoutings) );
			OnCreated();
		}
开发者ID:tdhung80,项目名称:RawDataAccessBencher,代码行数:8,代码来源:WorkOrder.cs

示例7: Nests

 public Nests()
 {
     _words = new EntitySet<Words>(
         new Action<Words>(this.attach_Words),
         new Action<Words>(this.detach_Words)
         );
 }
开发者ID:supudo,项目名称:Neolog-WP,代码行数:7,代码来源:Nests.cs

示例8: LoadWithId

        public override EntitySet LoadWithId(string type, string[] id, string[] attributes)
        {
            EntitySet result = new EntitySet();

            foreach (string itemId in id)
            {
                string strQuote = itemId.IndexOf("'") > 0 ? "\"" : "'"; // if id contains ' limiter is " else '

                ArrayList subQueries = new ArrayList();

                // Creates a query for each sub-type, and concatenates them using and OR expression
                foreach (string subtype in Factory.Model.GetTreeAsArray(type))
                    subQueries.Add(String.Concat("id(", strQuote, _CommandProcessor.GetKey(subtype, itemId), strQuote, ")"));

                if (subQueries.Count == 0)
                    throw new ModelElementNotFoundException("No such types in metadata: " + type);

                EntitySet es = LoadWithXPath(String.Join(" | ", (string[])subQueries.ToArray(typeof(string))));

                if (es.Count > 0)
                    result.Add(es[0]);
            }

            if (result.Count > 0)
                LoadAttribute(result, attributes);

            return result;
        }
开发者ID:npenin,项目名称:uss,代码行数:28,代码来源:XmlPersistenceEngine.cs

示例9: Handler_ReturnsTrue_WhenFound_ByUserId

        public void Handler_ReturnsTrue_WhenFound_ByUserId()
        {
            var userId = FakeData.Id();
            var otherUserId1 = FakeData.Id(userId);
            var otherUserId2 = FakeData.Id(userId, otherUserId1);
            var user = new ProxiedUser(userId);
            var otherUser1 = new ProxiedUser(otherUserId1);
            var otherUser2 = new ProxiedUser(otherUserId2);
            var localMemberships = new[]
            {
                new LocalMembership { User = otherUser1, },
                new LocalMembership { User = user, },
                new LocalMembership { User = otherUser2, },
            };
            var data = localMemberships.AsQueryable();
            var query = new UserHasLocalMembership(user.Id);
            var dbSet = new Mock<DbSet<LocalMembership>>(MockBehavior.Strict).SetupDataAsync(data);
            var entities = new Mock<IReadEntities>(MockBehavior.Strict);
            var entitySet = new EntitySet<LocalMembership>(dbSet.Object, entities.Object);
            entities.Setup(x => x.Query<LocalMembership>()).Returns(entitySet);
            var handler = new HandleUserHasLocalMembershipQuery(entities.Object);

            bool result = handler.Handle(query).Result;

            result.ShouldBeTrue();
            entities.Verify(x => x.Query<LocalMembership>(), Times.Once);
        }
开发者ID:phobos04,项目名称:tripod,代码行数:27,代码来源:UserHasLocalMembershipTests.cs

示例10: RbReasonOfAbsence

 public RbReasonOfAbsence()
 {
     this._ActionPropertyRbReasonOfAbsences = new EntitySet<ActionPropertyRbReasonOfAbsence>(new Action<ActionPropertyRbReasonOfAbsence>(this.attach_ActionPropertyRbReasonOfAbsences), new Action<ActionPropertyRbReasonOfAbsence>(this.detach_ActionPropertyRbReasonOfAbsences));
     this._Person_CreatePersonId  = default(EntityRef<Person>);
     this._Person_ModifyPersonId  = default(EntityRef<Person>);
     OnCreated();
 }
开发者ID:vvboborykin,项目名称:VistaMedTools,代码行数:7,代码来源:S11DataContext.RbReasonOfAbsence.Generated.cs

示例11: Group

 public Group()
 {
     _activitiesGroupsRef = new EntitySet<ActivityGroup>(
         new Action<ActivityGroup>(this.addActivitiesGroupsRef),
         new Action<ActivityGroup>(this.removeActivitiesGroupsRef)
         );
 }
开发者ID:karpop,项目名称:FIT-BC-WP-8,代码行数:7,代码来源:DbGroup.cs

示例12: ToDoCategory

 // Assign handlers for the add and remove operations, respectively.
 public ToDoCategory()
 {
     _todos = new EntitySet<ToDoItem>(
         new Action<ToDoItem>(this.attach_ToDo),
         new Action<ToDoItem>(this.detach_ToDo)
         );
 }
开发者ID:dannyp32,项目名称:activate,代码行数:8,代码来源:ToDoDataContext.cs

示例13: Handler_ReturnsNullLocalMembership_WhenNotFound_ByVerifiedEmail

        public void Handler_ReturnsNullLocalMembership_WhenNotFound_ByVerifiedEmail()
        {
            var emailAddress = FakeData.Email();
            var user = new User();
            user.EmailAddresses.Add(new EmailAddress
            {
                IsVerified = false,
                Value = emailAddress,
            });
            var data = new[]
            {
                new LocalMembership { User = user, },
            }.AsQueryable();
            var query = new LocalMembershipByVerifiedEmail(emailAddress);
            var dbSet = new Mock<DbSet<LocalMembership>>(MockBehavior.Strict).SetupDataAsync(data);
            var entities = new Mock<IReadEntities>(MockBehavior.Strict);
            var entitySet = new EntitySet<LocalMembership>(dbSet.Object, entities.Object);
            entities.Setup(x => x.Query<LocalMembership>()).Returns(entitySet);
            var handler = new HandleLocalMembershipByVerifiedEmailQuery(entities.Object);

            LocalMembership result = handler.Handle(query).Result;

            result.ShouldBeNull();
            entities.Verify(x => x.Query<LocalMembership>(), Times.Once);
        }
开发者ID:phobos04,项目名称:tripod,代码行数:25,代码来源:LocalMembershipByVerifiedEmailTests.cs

示例14: ECROperation

 public ECROperation()
 {
     this._ECRCheckItems = new EntitySet<ECRCheckItem>(new Action<ECRCheckItem>(this.attach_ECRCheckItems), new Action<ECRCheckItem>(this.detach_ECRCheckItems));
     this._Person  = default(EntityRef<Person>);
     this._RbECROperationType  = default(EntityRef<RbECROperationType>);
     OnCreated();
 }
开发者ID:vvboborykin,项目名称:VistaMedTools,代码行数:7,代码来源:S11DataContext.ECROperation.Generated.cs

示例15: RbTempInvalidExtraReason

 public RbTempInvalidExtraReason()
 {
     this._TempInvalids = new EntitySet<TempInvalid>(new Action<TempInvalid>(this.attach_TempInvalids), new Action<TempInvalid>(this.detach_TempInvalids));
     this._Person_CreatePersonId  = default(EntityRef<Person>);
     this._Person_ModifyPersonId  = default(EntityRef<Person>);
     OnCreated();
 }
开发者ID:vvboborykin,项目名称:VistaMedTools,代码行数:7,代码来源:S11DataContext.RbTempInvalidExtraReason.Generated.cs


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