我写程序在Linq到EF4我有在DataBase“项目”表,它FK到“公司”表。
也有它FK到“公司”表和“城市”表的“地址”表。
我想退货的项目包括他的地址和城市。
但我不能这样写:
var items = context.Items.Include("Company.Address[0].City").ToList();因为Include not get“”
发布于 2012-11-05 20:47:17
不需要[0]部件:
var items = context.Items.Include("Company.Address.City").ToList();发布于 2012-11-06 05:32:33
我弄错了:
类型'TrackableCollection`1‘中不存在属性或字段'Name’
https://stackoverflow.com/questions/13230022
复制相似问题