Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Async support in ServiceStack and OrmLite

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?

like image 321
Stig Schmidt Nielsson Avatar asked Sep 09 '12 12:09

Stig Schmidt Nielsson


2 Answers

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.

like image 86
mythz Avatar answered Sep 25 '22 14:09

mythz


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.

like image 29
Todd Menier Avatar answered Sep 24 '22 14:09

Todd Menier