Ejemplo n.º 1
0
 public void AddChamp(Championship champToBeAdded)
 {
     using (MNSportsTeamContext context = new MNSportsTeamContext())
     {
         context.Championships.Add(champToBeAdded);
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        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;
        }