[英]Linq-to-Sql LoadWith returns null
In my code I have this: 在我的代码中,我有:
DataLoadOptions dlo = new DataLoadOptions();
dlo.LoadWith<Place>(p => p.Address);
context.LoadOptions = dlo;
var places = context.Places.Where(p => p.ID >= 100 && p.ID <= 200);
The problem is the Address returned is null and I don't know why. 问题是返回的地址为空,我不知道为什么。
The probelm was child property in the association it was set true when I changed it to false it works fine. 该探针是关联中的子属性,当我将其更改为false时,将其设置为true即可正常工作。 thank you all for help 谢谢大家的帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.