public void testInit() { //SqlConnection connection = new SqlConnection(connectionString); //var context = new ConnectionContext(connection, true ContextCreator.Intialize(); var context = ContextCreator.GetContext(); myUow = new UnitOfWorkDapper <ConnectionContext>(context); Dictionary <string, Type> fieldIdName = new Dictionary <string, Type>(); fieldIdName.Add("id", typeof(int)); this.MyCarsRepository = new InternalRepository <Car, ConnectionContext>(myUow, tablename, fieldIdName); }