オブジェクトのグラフ全体を表示するクエリがあります。
IQueryable<Rapport> rap = this.ObjectContext.Rapport.Include("Filtre")
.Include("Filtre.FiltreValeur")
.Include("Tri")
.Include("Section")
.Include("Section.ChampTexte")
.Include("Section.ChampTexte.MiseEnForme")
.Include("Section.Attribut")
.Include("Section.Attribut.MiseEnForme")
.Where(r => r.PK_Rapport == PK_Rapport);
変数rapのコンテンツは、要求に応じてロードされます。私の問題は、クエリをロードするときに、ノード「Section」が空であり、ドメインサービスレベルでいっぱいであることを認識していることです。次のようにクエリをロードします。
EntityQuery<Rapport> query = _context.GetRapportCompletByIDQuery(_rapport.PK_Rapport);
_context.Load(query).Completed += (sender1, args1) =>
{
this._RapportComplet = ((LoadOperation<Rapport>)sender1).Entities.AsQueryable<Rapport>().First();};
私にはこれを解決する方法がわかりません。:( ヘルプ!