public static void UpdatePlayerStats(NPGGFFLDataContext context, PlayerStats playerStats, string passingCompletions, string passingAttempts, string passingYards, string passingTDS, string passingINTS, string passingSacksTaken, string passingSackYardsLost, string rushingCarries, string rushingYards, string rushingTDs, string receivingReceptions, string receivingYards, string receivingTDs, string receivingTargets, string fumbles, string fumblesLost, string fumblesReceovered, string totalTackles, string soloTackles, string sacks, string tacklesForLoss, string passesDefended, string qbHits, string defensiveTDs, string kickReturns, string kickReturnYards, string kickReturnTDs, string puntReturns, string puntReturnYards, string puntReturnTDs, string fieldGoalsMade, string fieldGoalsAttempted, string extraPointsMade, string extraPointsAttempted, string kickingPointsScored, string punts, string puntYards)
        {
            bool needToUpdate = false;

            try
            {
                if (
                        !playerStats.PassingCompletions.ToString().Equals(passingCompletions)
                        || !playerStats.PassingAttempts.ToString().Equals(passingAttempts)
                        || !playerStats.PassingYards.ToString().Equals(passingYards)
                        || !playerStats.PassingTDs.ToString().Equals(passingTDS)
                        || !playerStats.PassingINTs.ToString().Equals(passingINTS)
                        || !playerStats.SacksTaken.ToString().Equals(passingSacksTaken)
                        || !playerStats.SackYardsLost.ToString().Equals(passingSackYardsLost)
                        || !playerStats.RushingCarries.ToString().Equals(rushingCarries)
                        || !playerStats.RushingYards.ToString().Equals(rushingYards)
                        || !playerStats.RushingTDs.ToString().Equals(rushingTDs)
                        || !playerStats.ReceivingReceptions.ToString().Equals(receivingReceptions)
                        || !playerStats.ReceivingYards.ToString().Equals(receivingYards)
                        || !playerStats.ReceivingTDs.ToString().Equals(receivingTDs)
                        || !playerStats.ReceivingTargets.ToString().Equals(receivingTargets)
                        || !playerStats.Fumbles.ToString().Equals(fumbles)
                        || !playerStats.FumblesLost.ToString().Equals(fumblesLost)
                        || !playerStats.FumblesRecovered.ToString().Equals(fumblesReceovered)
                        || !playerStats.TotalTackles.ToString().Equals(totalTackles)
                        || !playerStats.SoloTackles.ToString().Equals(soloTackles)
                        || playerStats.Sacks != Convert.ToDecimal(sacks)
                        || !playerStats.TacklesForLoss.ToString().Equals(tacklesForLoss)
                        || !playerStats.PassesDefended.ToString().Equals(passesDefended)
                        || !playerStats.QBHits.ToString().Equals(qbHits)
                        || !playerStats.DefensiveTDs.ToString().Equals(defensiveTDs)
                        || !playerStats.KickReturns.ToString().Equals(kickReturns)
                        || !playerStats.KickReturnYards.ToString().Equals(kickReturnYards)
                        || !playerStats.KickReturnTDs.ToString().Equals(kickReturnTDs)
                        || !playerStats.PuntReturns.ToString().Equals(puntReturns)
                        || !playerStats.PuntReturnYards.ToString().Equals(puntReturnYards)
                        || !playerStats.PuntReturnTDs.ToString().Equals(puntReturnTDs)
                        || !playerStats.FieldGoalsMade.ToString().Equals(fieldGoalsMade)
                        || !playerStats.FieldGoalAttempts.ToString().Equals(fieldGoalsAttempted)
                        || !playerStats.ExtraPointsMade.ToString().Equals(extraPointsMade)
                        || !playerStats.ExtraPointAttempts.ToString().Equals(extraPointsAttempted)
                        || !playerStats.KickingPointsScored.ToString().Equals(kickingPointsScored)
                        || !playerStats.Punts.ToString().Equals(punts)
                        || !playerStats.PuntYards.ToString().Equals(puntYards))
                {
                    needToUpdate = true;
                }

                if (needToUpdate)
                {
                    Console.WriteLine(string.Format("{0}:{1}", "Update is needed for player", playerStats.Players.Name));
                    playerStats.PassingCompletions = Convert.ToInt32(passingCompletions);
                    playerStats.PassingAttempts = Convert.ToInt32(passingAttempts);
                    playerStats.PassingYards = Convert.ToInt32(passingYards);
                    playerStats.PassingTDs = Convert.ToInt32(passingTDS);
                    playerStats.PassingINTs = Convert.ToInt32(passingINTS);
                    playerStats.SacksTaken = Convert.ToInt32(passingSacksTaken);
                    playerStats.SackYardsLost = Convert.ToInt32(passingSackYardsLost);
                    playerStats.RushingCarries = Convert.ToInt32(rushingCarries);
                    playerStats.RushingYards = Convert.ToInt32(rushingYards);
                    playerStats.RushingTDs = Convert.ToInt32(rushingTDs);
                    playerStats.ReceivingReceptions = Convert.ToInt32(receivingReceptions);
                    playerStats.ReceivingYards = Convert.ToInt32(receivingYards);
                    playerStats.ReceivingTDs = Convert.ToInt32(receivingTDs);
                    playerStats.ReceivingTargets = Convert.ToInt32(receivingTargets);
                    playerStats.Fumbles = Convert.ToInt32(fumbles);
                    playerStats.FumblesLost = Convert.ToInt32(fumblesLost);
                    playerStats.FumblesRecovered = Convert.ToInt32(fumblesReceovered);
                    playerStats.TotalTackles = Convert.ToInt32(totalTackles);
                    playerStats.SoloTackles = Convert.ToInt32(soloTackles);
                    playerStats.Sacks = Convert.ToDecimal(sacks);
                    playerStats.TacklesForLoss = Convert.ToInt32(tacklesForLoss);
                    playerStats.PassesDefended = Convert.ToInt32(passesDefended);
                    playerStats.QBHits = Convert.ToInt32(qbHits);
                    playerStats.DefensiveTDs = Convert.ToInt32(defensiveTDs);
                    playerStats.KickReturns = Convert.ToInt32(kickReturns);
                    playerStats.KickReturnYards = Convert.ToInt32(kickReturnYards);
                    playerStats.KickReturnTDs = Convert.ToInt32(kickReturnTDs);
                    playerStats.PuntReturns = Convert.ToInt32(puntReturns);
                    playerStats.PuntReturnYards = Convert.ToInt32(puntReturnYards);
                    playerStats.PuntReturnTDs = Convert.ToInt32(puntReturnTDs);
                    playerStats.FieldGoalsMade = Convert.ToInt32(fieldGoalsMade);
                    playerStats.FieldGoalAttempts = Convert.ToInt32(fieldGoalsAttempted);
                    playerStats.ExtraPointsMade = Convert.ToInt32(extraPointsMade);
                    playerStats.ExtraPointAttempts = Convert.ToInt32(extraPointsAttempted);
                    playerStats.KickingPointsScored = Convert.ToInt32(kickingPointsScored);
                    playerStats.Punts = Convert.ToInt32(punts);
                    playerStats.PuntYards = Convert.ToInt32(puntYards);

                    //context.SubmitChanges();
                }
                else
                {
                    //Console.WriteLine(string.Format("{0}:{1}", "Skipping update of player", playerStats.Players.Name));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
 partial void DeletePlayerStats(PlayerStats instance);
 partial void UpdatePlayerStats(PlayerStats instance);
 partial void InsertPlayerStats(PlayerStats instance);
		private void detach_PlayerStats(PlayerStats entity)
		{
			this.SendPropertyChanging();
			entity.Games = null;
		}
		private void attach_PlayerStats(PlayerStats entity)
		{
			this.SendPropertyChanging();
			entity.Games = this;
		}