public UserController(IConfiguration Configuration) { string dbCon = Configuration.GetConnectionString("DefaultConnection"); userStorage = new UserStorage(dbCon); groupStorage = new GroupStorage(dbCon); userAttestationStorage = new UserAttestationStorage(dbCon); }
public void CourseTest() { using IDbConnection connection = new SqlConnection(DBConnection.connString); connection.Open(); IDbTransaction transaction = connection.BeginTransaction(); UAStorage = new UserAttestationStorage(connection, transaction); try { Setup(); TestSelects(); TestUpdate(); TestDelete(listAttestations); transaction.Commit(); } catch { transaction.Rollback(); throw new System.Exception(); } }