2
我有三個表格:方案,組件和塊。塊對ComponentId有一個外鍵,而Components對於場景有一個外鍵。QueryObject包含實體框架
塊還具有一個外鍵(TreeStructureId)到另一個表TreeStructures。
現在,爲什麼這項工作:
ObjectQuery<Blocks> blocks = edumatic3Entities.Blocks.Include("TreeStructures").Include("Components.Scenarios");
給它裝上TreeStructures,組件和方案。
然而,這並不工作:
ObjectQuery<Blocks> blocks = edumatic3Entities.Blocks.Include("Components.Scenarios").Include("TreeStructures");
這將加載組件和方案,但不加載TreeStructures ...
似乎很奇怪,我......這是爲什麼呢?
THX,利芬Cardoen
您是否試圖通過加載乾淨的edmx與northwind db重現該問題? – 2009-01-26 08:03:31
好像我修復了不知道原因的問題。可能做了一些愚蠢的事情。謝謝。 – 2009-02-02 08:13:21