【发布时间】:2012-02-21 12:40:45
【问题描述】:
我有以下文件:
public class Cars
{
[Key]
public string Id { get; set; }
public string Name { get; set; }
//collection of car price id
public List<string> CarsPriceIds { get; set; }
}
public class CarsPriceIds
{
[Key]
public string Id { get; set; }
public string Name { get; set; }
public List<string> CarTypesIds { get; set; }
}
public class CarTypes
{
[Key]
public string Id { get; set; }
public string Name { get; set; }
}
我的输入是汽车。 我需要在我的视图中显示 汽车名称和 CarType.Name 与 CarsPriceIds 匹配
我开始编写索引并卡住了。这是我的索引
new IndexDefinitionBuilder<Cars>
{
Map = docs => from doc in docs
from carsPriceId in doc.CarsPriceIds
from carTypes in ????
select new { doc.Name}
}
我不能继续!!! 接下来是什么?? 请帮忙
问候
【问题讨论】: