/// <summary> /// Deprecated Method for adding a new object to the Leagues EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToLeagues(League league) { base.AddObject("Leagues", league); }
void LeagueLoadCompleted(object sender, EventArgs e) { var loadedLeague = ((LoadOperation<League>)sender).Entities.FirstOrDefault(); SelectedLeague = loadedLeague ?? new League(); }
/// <summary> /// Create a new League object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="name">Initial value of the Name property.</param> public static League CreateLeague(global::System.Int32 id, global::System.String name) { League league = new League(); league.ID = id; league.Name = name; return league; }