return await session.Query<Post>() .Where(x => x.Id == "posts/1-A", false) .Select(x => new PostModel { Title = x.Title, Content = x.Content, PublishDate = (DateTime) x.PublishDate, Comments = x.Comments.Select(c => new CommentModel { Author = c.AuthorName, Content = c.Content, PublishDate = c.PublishDate } ) }) .FirstAsync(cancellationToken);from Posts as xwhere ID(x) = $p0select { Title : x.Title, Content : x.Content, PublishDate : x.PublishDate, Comments : x.Comments.map(function(c){ return { Author : c.AuthorName, Content : c.Content, PublishDate : c.PublishDate }; })} limit $p1, $p2
{"p0":"posts/35-A","p1":0,"p2":1}from Posts as xwhere x.Id = $p0 // See this line!select { Title : x.Title, Content : x.Content, PublishDate : x.PublishDate, Comments : x.Comments.map(function(c){ return { Author : c.AuthorName, Content : c.Content, PublishDate : c.PublishDate }; })} limit $p1, $p2
{"p0":"posts/35-A","p1":0,"p2":1}.Where(x => x.Id == "posts/1-A", false) .Where(x => x.Id == "posts/1-A")
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/5d0c028a-2039-4016-85ea-cfab8bd69da1%40googlegroups.com.
![]() | Arkadiusz Paliński Team Leader / Hibernating Rhinos LTD
|
To unsubscribe from this group and stop receiving emails from it, send an email to rav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/5d0c028a-2039-4016-85ea-cfab8bd69da1%40googlegroups.com.