简体   繁体   English

LINQ:我可以使用DataLoadOptions加载多代后代吗?

[英]LINQ: Can I load more than one generation of descendants with DataLoadOptions?

I'm using the following DataLoadOptions: 我正在使用以下DataLoadOptions:

DataLoadOptions options = new DataLoadOptions();
options.LoadWith<Family>(f => f.FamilyLanguages);
options.LoadWith<FamilyLanguage>(fl => fl.Language);

The Family object comes back with a list of FamilyLanguages, but the FamilyLanguages have only got a LanguageID, the Language object is null. Family对象返回了FamilyLanguages列表,但是FamilyLanguages只有一个LanguageID,Language对象为null。

This was working under Visual Studio 2010 Beta 2, but now I'm using the Visual Studio 2010 Release Candidate. 这是在Visual Studio 2010 Beta 2下工作的,但是现在我正在使用Visual Studio 2010 Release Candidate。 Is this no longer the proper way to do this? 这不再是执行此操作的正确方法吗? Has there been some change to LINQ? LINQ是否有所更改?

That should work. 那应该工作。 Stackoverflow is not a good way to reach microsoft with beta bugs - try contacting microsoft directly. Stackoverflow并不是通过Beta版错误联系Microsoft的好方法-尝试直接与Microsoft联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM