public void AddChamp(Championship champToBeAdded) { using (MNSportsTeamContext context = new MNSportsTeamContext()) { context.Championships.Add(champToBeAdded); context.SaveChanges(); } }
public Championship CreateChamp() { Console.Write("Championship Year: "); string champYear = Console.ReadLine(); Console.Write("\nTitle: "); string title = Console.ReadLine(); Championship newChamp = new Championship() { ChampYear = champYear, Title = title }; return newChamp; }