By on 6/15/2010 10:47 AM ()

You can workaround using code along these lines:

1
2
3
4
5
6
 

let titles = query <@ seq { for t in netFlix.Titles do yield t }   @> :?> IQueryable<NetFlix.Title>

for t in titles.Skip(100000) |> Seq.take 20 do printfn "%A" t.Name

'Skip' in this code is System.Linq.Queryable.Skip and happens on server; this code does not fetch 100000 netflix movies. Note the need to cast query result to IQueryable.

By on 6/15/2010 12:50 PM ()

Hi Brian,

I've bumped my head against this issue and find the workaround rather surprising. Is there any discovery mechanism for this or is the implementation of IQueryable for query-transformed expressions hidden?

thanks,

Danny

By on 10/24/2010 12:47 PM ()

I've just come across this one too, would something like:

let titles = query <@ netFlix.Titles @> :?> IQueryable<NetFlix.Title>

for t in titles.Skip(100000).Take(20) do printfn "%A" t.Name

Ensure both skip and take happen on the server? In my case it's a nosql database, so I'd be worried about bring over all the documents after the take.

Cheers,

Rob

By on 5/4/2011 11:24 AM ()

thx

By on 6/16/2010 4:46 AM ()

Example code: [link:pastebin.org]

By on 6/15/2010 12:42 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper