Question

Currently there exists an async branch of ServiceStack which will make it possible to create async services. But to get all benefits of async, all IO bound operations should be async and therefore all database requests should also be async. I am currently using OrmLite with Postgresql and I would therefore like to know if OrmLite supports async queries/operations? If not, what other .Net Micro-Orms supports async operations?

Was it helpful?

Solution

OrmLite has 1st class Async support for all its RDBMS Providers which support async ADO.NET provider implementations (inc. PostgreSQL/Npgsql), otherwise falls back "pseudo async" support over its sync ADO.NET provider APIs which allows using Async APIs in RDBMS providers that don't support it whilst able to benefit from async implementations when running against RDBMS providers that do.

OTHER TIPS

I've recently begun work on AsyncPoco, a fully asynchronous fork of the popular PetaPoco micro-ORM. It still needs some testing and some proper documentation/examples, and as of yet does not support PostgreSQL. UPDATE: AsyncPoco now has some basic documentation and samples, and PostgreSQL is now supported!

At any rate, you asked about other .NET micro-ORMs that support async operations, so I thought I thought I'd mention it as one to keep any eye on.

Sorry if I misunderstood the question

but why can you not wrap the calls using the Task Parallel Library TPL or equivalent?

This is what I do and I am quite happy with results. At the end of the day you are only querying for data...

Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top