using Dapper; using System.Data; using System.Data.SqlClient; namespace Estsh.Core.Dapper { public class DapperDbContext { private string connectionString; private IDbConnection dbConnection { get; set; } public DapperDbContext(string settings) { this.connectionString = settings; DefaultTypeMap.MatchNamesWithUnderscores = true; this.GetDbConnection(); } public IDbConnection GetDbConnection() { this.dbConnection = new SqlConnection(this.connectionString); return this.dbConnection; } } }