private static int WriteUserTeamGameweekHistoryToDB(UserTeamGameweekHistories userTeamGameweekHistoryInsert, SqlConnection db)
 {
     try
     {
         UserTeamGameweekHistoryRepository userTeamGameweekHistoryRepository = new UserTeamGameweekHistoryRepository();
         int userTeamGameweekHistoryRowsInserted = userTeamGameweekHistoryRepository.InsertUserTeamGameweekHistories(userTeamGameweekHistoryInsert, db);
         return(userTeamGameweekHistoryRowsInserted);
     }
     catch (Exception ex)
     {
         Logger.Error("Program WriteUserTeamGameweekHistoryToDB error: " + ex.Message);
         return(0);
     }
 }
        public static void WriteUserTeamGameweekHistoryToDB(int pageId, UserTeamGameweekHistories userTeamGameweekHistoriesInsert, SqlConnection db)
        {
            try
            {
                UserTeamGameweekHistoryRepository userTeamGameweekHistoryRepository = new UserTeamGameweekHistoryRepository();

                //Write UserTeamGameweekHistory to the db
                Globals.UserTeamGameweekHistoryRowsInserted = userTeamGameweekHistoryRepository.InsertUserTeamGameweekHistories(userTeamGameweekHistoriesInsert, db);
                Logger.Out("UserTeamGameweekHistory bulk insert complete (PageId: " + Convert.ToString(pageId) + ")");

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