Create a DbContext that handle a DatabaseFactory to use DapperExtensions more easily
This days I try to create an abstract base repository using some basic CRUD functions proposed by DapperExtensions . But the code given as an exemple use a SqlConnection which is made to connect to a SQL Server database. I want to be able to connect to all kind of Database (SQL Server, MySql, etc...). Also their code sample is repeated for each CRUD function as the code below show using (SqlConnection cn = new SqlConnection(_connectionString)) { cn.Open(); //Code doing something here... cn.Close(); } So i was thinking about to create a DbContext that can handle the creation, the opening and