This project has moved. For the latest updates, please go here.

Async Queries on WP8

Aug 3, 2013 at 6:08 PM
I know all queries should be executed asynchronously but throwing an exception unless the AsyncCallback or MaterializedAsyncCallback methods are being used does not make a lot of sense because, and in my opinion, a better solution, would be something like this:
public async Task<LinqToTwitter.User> GetUser(string twitterId)
            return await Task.Run(() =>
                return _context.User
                    .Where((u) => (u.UserID == twitterId && u.Type == UserType.Show))
This then allows me to 'await' on the method.

Am I missing something, is this possible right now, what are your thoughts?
Aug 3, 2013 at 7:37 PM

That's where I would like to get to. I initially used an APM async design to support .NET 3.5, which was widely used when I started LINQ to Twitter in 2008. Adopting C# 4.5 async requires a re-design and tradeoffs. A re-design takes time, which is a rare commodity on an open-source project. The tradeoffs involve supporting two async paradigms and possibly taking on a dependency in the .NET 4.0 version. This increases complexity, maintainability, which will affect the amount of time I have for support issues, such as answering forum questions, documentation, and samples. I also have other goals, such as extending support to Android, iOS, and Mono. So, better async support is something that I definitely want to do, but you might not see it in the near future.