PageRenderTime 53ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/Raven.Tests/Bugs/TransformResults/ThorIndex.cs

https://github.com/barryhagan/ravendb
C# | 17 lines | 16 code | 1 blank | 0 comment | 0 complexity | e77501defc7d697c0c2a3adb812283db MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, CC-BY-SA-3.0
  1. using System.Linq;
  2. using Raven.Client.Indexes;
  3. namespace Raven.Tests.Bugs.TransformResults
  4. {
  5. public class ThorIndex : AbstractIndexCreationTask<Thor>
  6. {
  7. public ThorIndex()
  8. {
  9. Map = thors => from doc in thors
  10. select new {doc.Name};
  11. TransformResults = (database, thors) =>
  12. from item in thors
  13. select new {Id = item.Id, item.Name};
  14. }
  15. }
  16. }