我有一个ravendb类像这样:解决方法在ravendb的SelectMany使用客户端API
public class Student
{
public string Id { get; set; }
public string TopLevelProperty { get; set; }
public Dictionary<string, string> Attributes { get; set; }
public Dictionary<string,List<Dictionary<string, string>>> CategoryAttributes { get; set; }
}
和像这样的文件:
下LINQ将无法正常工作因的SelectMany :
test = (from student in session.Query()
from eduhistory in student.CategoryAttributes["EducationHistory"]
where eduhistory["StartYear"] == "2009"
select student).ToList();
如何让所有学生在StartYear == 2009?
对于像我使用的情况下( “CategoryAttributes.EducationHistory,StartYear:* 200 *”) – basarat 2011-05-12 10:20:18