/// <summary>
 /// Deprecated Method for adding a new object to the StandardPlayoffSuperbowlPicks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStandardPlayoffSuperbowlPicks(StandardPlayoffSuperbowlPick standardPlayoffSuperbowlPick)
 {
     base.AddObject("StandardPlayoffSuperbowlPicks", standardPlayoffSuperbowlPick);
 }
 public void SaveStandardPicks(MyPredictViewModel vm, string userId)
 {
     var cwp = _ctx.StandardPicks.GetCurrentWeekStandardPicks(vm.CurrentWeek).ToList();
     //
     if (cwp.Count > 0)
     {
         foreach (var standardPick in cwp)
         {
             standardPick.Active = false;
             standardPick.UpdateBy = userId;
             standardPick.UpdateDate = DateTime.Now;
         }
         //
     }
     //
     foreach (var pick in vm.MyPicks)
     {
         if (pick.Game != null && pick.Game.Id > 0 && pick.Team != null && pick.Team.Id > 0)
         {
             var p = new StandardPick()
                         {
                             Game_Id = pick.Game.Id,
                             PointTotal = pick.PointTotal,
                             Team_Id = pick.Team.Id,
                             UpdateBy = userId,
                             UpdateDate = DateTime.Now,
                             Active = true
                         };
             //
             _ctx.AddToStandardPicks(p);
         }
     }
     //
     var cwpp = _ctx.StandardPlayoffSuperbowlPicks.GetCurrentWeekPlayoffStandardPicks(vm.CurrentWeek).ToList();
     if (cwpp.Count > 0)
     {
         foreach (var standardPick in cwpp)
         {
             standardPick.Active = false;
             standardPick.UpdateBy = userId;
             standardPick.UpdateDate = DateTime.Now;
         }
         //
     }
     //
     foreach (var pick in vm.MyPlayoffPicks)
     {
         var p = new StandardPlayoffSuperbowlPick()
         {
             IsPlayoff = true,
             Active = true,
             Week = vm.CurrentWeek,
             PointTotal = (_ctx.Games.GetMaxRegularSeasonWeekCurrentSeason() - vm.CurrentWeek) + 1,
             Season_Id = vm.TheSeason.Id,
             Team_Id = pick.Team.Id,
             UpdateBy = userId,
             UpdateDate = DateTime.Now
         };
         //
         _ctx.AddToStandardPlayoffSuperbowlPicks(p);
     }
     //
     var cwsp = _ctx.StandardPlayoffSuperbowlPicks.GetCurrentWeekSuperbowlStandardPicks(vm.CurrentWeek);
     if (cwpp.Count > 0)
     {
         foreach (var standardPick in cwsp)
         {
             standardPick.Active = false;
             standardPick.UpdateBy = userId;
             standardPick.UpdateDate = DateTime.Now;
         }
         //
     }
     //
     foreach (var pick in vm.MySuperbowlPicks)
     {
         var p = new StandardPlayoffSuperbowlPick()
         {
             IsSuperbowl = true,
             Active = true,
             Week = vm.CurrentWeek,
             PointTotal = ((_ctx.Games.GetMaxRegularSeasonWeekCurrentSeason() - vm.CurrentWeek) + 1)*2,
             Season_Id = vm.TheSeason.Id,
             Team_Id = pick.Team.Id,
             UpdateBy = userId,
             UpdateDate = DateTime.Now
         };
         //
         _ctx.AddToStandardPlayoffSuperbowlPicks(p);
     }
     //
     _ctx.SaveChanges();
     //
 }
 /// <summary>
 /// Create a new StandardPlayoffSuperbowlPick object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="season_Id">Initial value of the Season_Id property.</param>
 /// <param name="week">Initial value of the Week property.</param>
 /// <param name="isPlayoff">Initial value of the IsPlayoff property.</param>
 /// <param name="isSuperbowl">Initial value of the IsSuperbowl property.</param>
 /// <param name="pointTotal">Initial value of the PointTotal property.</param>
 /// <param name="team_Id">Initial value of the Team_Id property.</param>
 public static StandardPlayoffSuperbowlPick CreateStandardPlayoffSuperbowlPick(global::System.Int32 id, global::System.Int32 season_Id, global::System.Int32 week, global::System.Boolean isPlayoff, global::System.Boolean isSuperbowl, global::System.Int32 pointTotal, global::System.Int32 team_Id)
 {
     StandardPlayoffSuperbowlPick standardPlayoffSuperbowlPick = new StandardPlayoffSuperbowlPick();
     standardPlayoffSuperbowlPick.Id = id;
     standardPlayoffSuperbowlPick.Season_Id = season_Id;
     standardPlayoffSuperbowlPick.Week = week;
     standardPlayoffSuperbowlPick.IsPlayoff = isPlayoff;
     standardPlayoffSuperbowlPick.IsSuperbowl = isSuperbowl;
     standardPlayoffSuperbowlPick.PointTotal = pointTotal;
     standardPlayoffSuperbowlPick.Team_Id = team_Id;
     return standardPlayoffSuperbowlPick;
 }