private static int WriteUserTeamH2hLeagueToDB(UserTeamH2hLeagues userTeamH2hLeaguesInsert, SqlConnection db)
 {
     try
     {
         UserTeamH2hLeagueRepository userTeamH2hLeagueRepository = new UserTeamH2hLeagueRepository();
         int userTeamH2hLeagueRowsInserted = userTeamH2hLeagueRepository.InsertUserTeamH2hLeague(userTeamH2hLeaguesInsert, db);
         return(userTeamH2hLeagueRowsInserted);
     }
     catch (Exception ex)
     {
         Logger.Error("Program WriteUserTeamH2hLeagueToDB error: " + ex.Message);
         return(0);
     }
 }
        public static void WriteUserTeamH2hLeagueToDB(int pageId, UserTeamH2hLeagues userTeamH2hLeaguesInsert, SqlConnection db)
        {
            try
            {
                UserTeamH2hLeagueRepository userTeamH2hLeagueRepository = new UserTeamH2hLeagueRepository();

                //Write UserTeamH2hLeague to the db
                Globals.UserTeamH2hLeagueRowsInserted = userTeamH2hLeagueRepository.InsertUserTeamH2hLeague(userTeamH2hLeaguesInsert, db);
                Logger.Out("UserTeamH2hLeague bulk insert complete (PageId: " + Convert.ToString(pageId) + ")");

                userTeamH2hLeaguesInsert.Clear();
            }
            catch (Exception ex)
            {
                Logger.Error("Program WriteUserTeamH2hLeagueToDB error: " + ex.Message);
            }
        }