什么.Net orms或MicroOrms支持异步操作和PostgreSql [英] What .Net orms or MicroOrms support async operations and PostgreSql
问题描述
什么ORM支持异步操作和postgresql?
What ORM's support async operations and postgresql ?
我更喜欢Dapper和OrmLite之类的简单MicroOrms,因为它们似乎具有出色的性能并且确实很简单,但是它们确实据我所知,它不支持异步操作。
I prefer simple MicroOrms like Dapper and OrmLite because they seems to have great performance and they are really simple, but they do not support async operations as far as I can tell.
也许我是错的,但使所有IO绑定的操作异步以获取需要扩展的异步Web服务的全部好处不是很重要吗?
Maybe I am wrong, but isn't important to make all IO bound operations async to get the full benefits of say an async web service that needs to scale?
那么对于同时支持异步操作和Postgresql的MicroOrm,有哪些选择?我刚刚读了一个名为Insight.Data的新Orm,但不确定它是否正确支持PostgreSql。
So what are the options regarding an MicroOrm with support for both async operations and Postgresql? I have just read about a new Orm called Insight.Data, but I am unsure whether it properly supports PostgreSql.
推荐答案
在使用.NET 4.5时,我写了一个 Dapper叉,它在内部添加了异步方法调用 ExecuteReaderAsync 。它也是在NuGet上可用的。我尚未使用Postgresql对其进行测试,但是如果Dapper可以使用它,那么我的叉子也应该可以。
If you are using .NET 4.5, I wrote a fork of Dapper that adds async methods that internally call ExecuteReaderAsync. It is also available on NuGet. I haven't tested it with Postgresql but if Dapper works with it then my fork should as well.
这篇关于什么.Net orms或MicroOrms支持异步操作和PostgreSql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!