以下两个查询都按预期工作。我无法弄清楚如何使用“Include()”方法一次性从数据库中返回两者。
var result = _documentsSession
.Advanced
.LuceneQuery<MessageStatisticResult, MessageSummaryByUserIndex>()
.Where("Email:" + command.UserName);
var user = _documentSession
.Load<IUser>("users/" + command.UserName);
一旦我添加了“Include()”方法,Query() 和 Advance() 都不再相关。有没有办法做到这一点?