使用可枚举范围的Ravendb3.0索引

使用可枚举范围的Ravendb3.0索引,ravendb,Ravendb,我在RavenDB 3.0 build 3599中有以下索引: from pupil in docs.Pupils from year in Enumerable.Range(pupil.BirthAcademicYear, 12) select new { pupil.Upn, year } 它失败,返回以下错误消息: Cannot implicitly convert type 'object' to 'System.Collections.Generic.IEnumera

我在RavenDB 3.0 build 3599中有以下索引:

from pupil in docs.Pupils
from year in Enumerable.Range(pupil.BirthAcademicYear, 12)
select new {
    pupil.Upn,
    year
}
它失败,返回以下错误消息:

Cannot implicitly convert type 'object' to 'System.Collections.Generic.IEnumerable<object>'. An explicit conversion exists (are you missing a cast?)
这将导致以下错误:

'object' does not contain a definition for 'Cast'

将索引更改为:

from pupil in docs.Pupils
from year in Enumerable.Select(Enumerable.Range(pupil.BirthAcademicYear, 12), (Func<int,object>)(u=> u))
select new {
    pupil.Upn,
    year
}

这会导致异常:无法将类型为“d_ub8”的对象强制转换为类型为“System.Collections.Generic.IEnumerable`1[System.object]”。
from pupil in docs.Pupils
from year in Enumerable.Select(Enumerable.Range(pupil.BirthAcademicYear, 12), (Func<int,object>)(u=> u))
select new {
    pupil.Upn,
    year
}