我有这种结构存储在Raven DB中
public class AAA
{
public int Id { get; set; }
public string Name { get; set; }
}
public class BBB
{
public int Id { get; set; }
public string Name { get; set; }
public List<int> AAAIds { get; set; }
}
我尝试查询基本上显示的内容如下:
public class AAA_BBB
{
public int AAB_Id { get; set; }
public string AAA_Name { get; set; }
public bool ContainsAtLeastOneBBB { get; set; }
}
我试图做以下事情: var AAA_BBB = session.Query()。Include(a =&gt; a.AAAIds.Select(a =&gt; a))
答案 0 :(得分:0)
您需要以下内容:
session.Query<BBB>().Include<BBB,AAA>(x=>x.AAAIds)