Where is ToListAsync()

762 views
Skip to first unread message

Ben

unread,
Jul 20, 2012, 7:56:53 AM7/20/12
to rav...@googlegroups.com
I'm using the latest pre-release RavenDB.Client on NuGet and can't find the ToListAsync method.

Oren Eini (Ayende Rahien)

unread,
Jul 20, 2012, 7:57:54 AM7/20/12
to rav...@googlegroups.com
Raven.Client.Linq;

Ben

unread,
Jul 20, 2012, 8:03:10 AM7/20/12
to rav...@googlegroups.com
Should this work with "await"?

Trying out async in ASP.NET Web API.

Ben

unread,
Jul 20, 2012, 8:08:37 AM7/20/12
to rav...@googlegroups.com
User error. Here is a working example:

        // GET api/sites
        public async Task<IEnumerable<Site>> Get()
        {
            using (var session = store.OpenAsyncSession())
            {                
                var sites = await session.Query<Site>().ToListAsync();
                return sites;

Oren Eini (Ayende Rahien)

unread,
Jul 20, 2012, 8:12:52 AM7/20/12
to rav...@googlegroups.com
Yes, it does

Chris Marisic

unread,
Jul 20, 2012, 8:23:16 AM7/20/12
to rav...@googlegroups.com
 I can't wait for .NET 4.5 MVC4 and async to combine with RavenDB.

Oren Eini (Ayende Rahien)

unread,
Jul 20, 2012, 8:25:21 AM7/20/12
to rav...@googlegroups.com
We are already there in terms of our actual API
Reply all
Reply to author
Forward
0 new messages