本文整理汇总了C#中EntityCollection.Load方法的典型用法代码示例。如果您正苦于以下问题:C# EntityCollection.Load方法的具体用法?C# EntityCollection.Load怎么用?C# EntityCollection.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityCollection
的用法示例。
在下文中一共展示了EntityCollection.Load方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMemberImplCollection
internal EntityCollection<Zetbox.App.Base.Identities_memberOf_Groups_RelationEntryEfImpl> GetMemberImplCollection()
{
if (_MemberImplEntityCollection == null)
{
_MemberImplEntityCollection
= ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.Base.Identities_memberOf_Groups_RelationEntryEfImpl>(
"Model.FK_Identities_memberOf_Groups_B",
"CollectionEntry");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_MemberImplEntityCollection.IsLoaded)
{
_MemberImplEntityCollection.Load();
}
_MemberImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("Member", null, null); if(OnMember_PostSetter != null && IsAttached) OnMember_PostSetter(this); };
}
return _MemberImplEntityCollection;
}
示例2: GetWorkScheduleRulesImplCollection
internal EntityCollection<Zetbox.App.Calendar.WorkScheduleRuleEfImpl> GetWorkScheduleRulesImplCollection()
{
if (_WorkScheduleRulesImplEntityCollection == null)
{
_WorkScheduleRulesImplEntityCollection = ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.Calendar.WorkScheduleRuleEfImpl>(
"Model.FK_WorkSchedule_has_WorkScheduleRules",
"WorkScheduleRules");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_WorkScheduleRulesImplEntityCollection.IsLoaded)
{
_WorkScheduleRulesImplEntityCollection.Load();
}
_WorkScheduleRulesImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("WorkScheduleRules", null, null); if (OnWorkScheduleRules_PostSetter != null && IsAttached) OnWorkScheduleRules_PostSetter(this); };
}
return _WorkScheduleRulesImplEntityCollection;
}
示例3: GetTestCustomObjects_ManyList_NavImplCollection
internal EntityCollection<Zetbox.App.Test.MB_Many_Role_has_TCO_ManyList_Role_RelationEntryEfImpl> GetTestCustomObjects_ManyList_NavImplCollection()
{
if (_TestCustomObjects_ManyList_NavImplEntityCollection == null)
{
_TestCustomObjects_ManyList_NavImplEntityCollection
= ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.Test.MB_Many_Role_has_TCO_ManyList_Role_RelationEntryEfImpl>(
"Model.FK_MB_Many_Role_has_TCO_ManyList_Role_A",
"CollectionEntry");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_TestCustomObjects_ManyList_NavImplEntityCollection.IsLoaded)
{
_TestCustomObjects_ManyList_NavImplEntityCollection.Load();
}
_TestCustomObjects_ManyList_NavImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("TestCustomObjects_ManyList_Nav", null, null); if(OnTestCustomObjects_ManyList_Nav_PostSetter != null && IsAttached) OnTestCustomObjects_ManyList_Nav_PostSetter(this); };
}
return _TestCustomObjects_ManyList_NavImplEntityCollection;
}
示例4: GetOrderedNSideImplCollection
internal EntityCollection<Zetbox.App.Test.One_to_N_relations_OrderedNEfImpl> GetOrderedNSideImplCollection()
{
if (_OrderedNSideImplEntityCollection == null)
{
_OrderedNSideImplEntityCollection = ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.Test.One_to_N_relations_OrderedNEfImpl>(
"Model.FK_OneSide_connectsTo_OrderedNSide",
"OrderedNSide");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_OrderedNSideImplEntityCollection.IsLoaded)
{
_OrderedNSideImplEntityCollection.Load();
}
_OrderedNSideImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("OrderedNSide", null, null); if (OnOrderedNSide_PostSetter != null && IsAttached) OnOrderedNSide_PostSetter(this); };
}
return _OrderedNSideImplEntityCollection;
}
示例5: GetAntwortenImplCollection
internal EntityCollection<Zetbox.App.Test.AntwortEfImpl> GetAntwortenImplCollection()
{
if (_AntwortenImplEntityCollection == null)
{
_AntwortenImplEntityCollection = ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.Test.AntwortEfImpl>(
"Model.FK_Ein_Fragebogen_enthaelt_gute_Antworten",
"gute_Antworten");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_AntwortenImplEntityCollection.IsLoaded)
{
_AntwortenImplEntityCollection.Load();
}
_AntwortenImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("Antworten", null, null); if (OnAntworten_PostSetter != null && IsAttached) OnAntworten_PostSetter(this); };
}
return _AntwortenImplEntityCollection;
}
示例6: GetSecondaryControlKindsImplCollection
internal EntityCollection<Zetbox.App.GUI.Presentable_displayedBy_SecondaryControlKinds_RelationEntryEfImpl> GetSecondaryControlKindsImplCollection()
{
if (_SecondaryControlKindsImplEntityCollection == null)
{
_SecondaryControlKindsImplEntityCollection
= ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.GUI.Presentable_displayedBy_SecondaryControlKinds_RelationEntryEfImpl>(
"Model.FK_Presentable_displayedBy_SecondaryControlKinds_A",
"CollectionEntry");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_SecondaryControlKindsImplEntityCollection.IsLoaded)
{
_SecondaryControlKindsImplEntityCollection.Load();
}
_SecondaryControlKindsImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("SecondaryControlKinds", null, null); if(OnSecondaryControlKinds_PostSetter != null && IsAttached) OnSecondaryControlKinds_PostSetter(this); };
}
return _SecondaryControlKindsImplEntityCollection;
}
示例7: GetSourceColumnImplCollection
internal EntityCollection<Zetbox.App.SchemaMigration.SourceColumnEfImpl> GetSourceColumnImplCollection()
{
if (_SourceColumnImplEntityCollection == null)
{
_SourceColumnImplEntityCollection = ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<Zetbox.App.SchemaMigration.SourceColumnEfImpl>(
"Model.FK_SourceColumn_belongs_to_SourceTable",
"SourceColumn");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_SourceColumnImplEntityCollection.IsLoaded)
{
_SourceColumnImplEntityCollection.Load();
}
_SourceColumnImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("SourceColumn", null, null); if (OnSourceColumn_PostSetter != null && IsAttached) OnSourceColumn_PostSetter(this); };
}
return _SourceColumnImplEntityCollection;
}
示例8: GetRevisionsImplCollection
internal EntityCollection<at.dasz.DocumentManagement.Document_has_Revisions_RelationEntryEfImpl> GetRevisionsImplCollection()
{
if (_RevisionsImplEntityCollection == null)
{
_RevisionsImplEntityCollection
= ((IEntityWithRelationships)(this)).RelationshipManager
.GetRelatedCollection<at.dasz.DocumentManagement.Document_has_Revisions_RelationEntryEfImpl>(
"Model.FK_Document_has_Revisions_A",
"CollectionEntry");
// the EntityCollection has to be loaded before attaching the AssociationChanged event
// because the event is triggered while relation entries are loaded from the database
// although that does not require notification of the business logic.
if (this.EntityState.In(System.Data.EntityState.Modified, System.Data.EntityState.Unchanged)
&& !_RevisionsImplEntityCollection.IsLoaded)
{
_RevisionsImplEntityCollection.Load();
}
_RevisionsImplEntityCollection.AssociationChanged += (s, e) => { this.NotifyPropertyChanged("Revisions", null, null); if(OnRevisions_PostSetter != null && IsAttached) OnRevisions_PostSetter(this); };
}
return _RevisionsImplEntityCollection;
}