I want to replace Dapper with OrmLite fully, But I Can’t Find a method “ExecuteReader” in IDbConnection like Dapper, how to solve it?
ExecuteReader
isn’t a method on IDbConnection
it’s a method on ADO.NET IDbCommand
, newer versions of Dapper added extension methods on IDbConnection
so I’ve just updated OrmLite’s internal version of Dapper to the latest version where Dapper’s ExecuteReader
extension methods is now available in OrmLite’s internal version of Dapper in the ServiceStack.OrmLite.Dapper
namespace.
This change is available from v4.0.43+ that’s now available from MyGet.
But what’s the DB query that requires calling ExecuteReader()
directly? As there might be a more suitable way to rewrite it.
Thank you for replied so clearly。There are some old solutions need use ExecuteReader directly。
The Dapper has SqlMapperAsync.cs( https://github.com/StackExchange/dapper-dot-net/blob/master/Dapper%20NET45/SqlMapperAsync.cs) , It is Used For Async Method, Would you like to include in the lasted version.
Hi, we’ve just added SqlMapper.Async.cs in this commit.
This change is also available from v4.0.43+ on MyGet but if you already have v4.0.43 installed you’ll need to clear your NuGet packages cache and delete your /packages folder to ensure the latest version is download.