我有一个像这样的 ravendb 类:
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; }
}
和这样的文件:
由于 selectmany,以下 linq 将无法工作:
test = (from student in session.Query()
from eduhistory in student.CategoryAttributes["EducationHistory"]
where eduhistory["StartYear"] == "2009"
select student).ToList();
如何让 StartYear == 2009 的所有学生?