コード例 #1
0
 public override void Setup()
 {
     base.Setup();
     dao = new PlatformsSQLDAO(ConnectionString);
     using (SqlConnection connection = new SqlConnection(ConnectionString))
     {
         connection.Open();
         SqlCommand cmd = connection.CreateCommand();
         cmd.CommandText = @"insert into Platforms (platform_id,platform_name) values(23,'CODE DS'),
         (20,'CODE NDS'),(1,'boom')";
         cmd.ExecuteNonQuery();
     }
 }
コード例 #2
0
 public DataBaseMediator()
 {
     platformsSQLDAO      = new PlatformsSQLDAO(ConnectionString);
     coverSQLDAO          = new CoversSQLDAO(ConnectionString);
     franchiseSQLDAO      = new FranchisesSQLDAO(ConnectionString);
     gameInfoSQLDAO       = new GameInfoSQLDAO(ConnectionString);
     gameRatingSQLDAO     = new GameRatingSQLDAO(ConnectionString);
     genresSQLDAO         = new GenresSQLDAO(ConnectionString);
     userGameInfoSQLDAO   = new UserGameInfoSQLDAO(ConnectionString);
     userLoginSQLDAO      = new UserLoginSqlDao(ConnectionString, hash);
     genresIGDBDAO        = new GenresIGDBDAO(UserApiKey);
     platformsInfoIGDBDAO = new PlatformsIGDBDAO(UserApiKey);
     gameInfoIGDBDAO      = new GameInfoIGDBDAO(UserApiKey, ConnectionString);
     coversIGDBDAO        = new CoversIGDBDAO(UserApiKey);
     franchisesIGDBDAO    = new FranchisesIGDBDAO(UserApiKey);
 }