private DataEF.GoalieSeasonStat SetGoalieStats(DataEF.Season dbSeason, DataEF.Goalie dbGoalie, SthsData.GoalieSeasonStats goalieStats) { var dbSeasonStats = new DataEF.GoalieSeasonStat() { Season = dbSeason, Goalie = dbGoalie, Team = DataDB, }; PopulateGoalieStats(dbSeasonStats, goalieStats); Database.GoalieSeasonStats.Add(dbSeasonStats); return(dbSeasonStats); }
private DataEF.GoalieSeasonStat SetSubtotalGoalieStats(DataEF.Season dbSeason, DataEF.Goalie dbGoalie, SthsData.GoalieSeasonStats goalieStats) { var dbSeasonStats = new DataEF.GoalieSeasonStat() { Season = dbSeason, Goalie = dbGoalie, Team = dbSeason.Teams.Where(a => a.Acronym == goalieStats.TeamAcronym).First(), IsSubtotal = true, }; PopulateGoalieStats(dbSeasonStats, goalieStats); Database.GoalieSeasonStats.Add(dbSeasonStats); return(dbSeasonStats); }
private static void PopulateGoalieStats(DataEF.GoalieSeasonStat dbSeasonStats, SthsData.GoalieSeasonStats goalieStats) { dbSeasonStats.GP = goalieStats.GP; dbSeasonStats.W = goalieStats.W; dbSeasonStats.L = goalieStats.L; dbSeasonStats.OTL = goalieStats.OTL; dbSeasonStats.MP = goalieStats.MP; dbSeasonStats.PIM = goalieStats.PIM; dbSeasonStats.SO = goalieStats.SO; dbSeasonStats.GA = goalieStats.GA; dbSeasonStats.SA = goalieStats.SA; dbSeasonStats.SAR = goalieStats.SAR; dbSeasonStats.A = goalieStats.A; dbSeasonStats.EG = goalieStats.EG; dbSeasonStats.PSS = goalieStats.PSS; dbSeasonStats.PSA = goalieStats.PSA; dbSeasonStats.ST = goalieStats.ST; dbSeasonStats.BG = goalieStats.BG; dbSeasonStats.S1 = goalieStats.S1; dbSeasonStats.S2 = goalieStats.S2; dbSeasonStats.S3 = goalieStats.S3; }