The connection management wrapper for Dapper.net. *************************************** // To create an instance of database context inherit DbContext class TestDb : DbContext { private const string ConnectionName = "DefaultConnection"; private TestDb() : base(ConnectionName) { } } // execute multiple statatements using same connection // connection and transaction (if needed) var db = new TestDb(); db.Batch(s => { s.BeginTransaction(); try { s.Execute([Your query]); s.CommitTransaction(); } catch { s.RollbackTransaction(); throw; } }); // using it with ninject kernel.Bind<IDbContext>().To<TestDb>().InSingletonScope();
$ dotnet add package Dapper.DataNo README available.