protected override IEnumerable<NeuralVectorFlow> DoGetNext(IndexSet indexes) { using (var ctx = new LeCunDataEntities()) { var selectIndexes = indexes.ToDictionary(i => indexMap[i]); foreach (var sample in (from s in ctx.Samples where s.IsTraining == IsTraining && selectIndexes.Keys.Contains(s.ID) select s)) { yield return ToFlow(selectIndexes[sample.ID], sample); } } }