public PlayerRepository(NbaContext context) : base(context) { }
public Repository(NbaContext context) { this.context = context; }
public PlayerRepository(NbaContext context) { _context = context; }
public LeagueRepository(NbaContext context) : base(context) { }
public static void SeedConferences(NbaContext context) { context.Teams.AddRange( new Team { Id = 1, Name = "Boston Celtics", City = "Boston", Coach = "Brad Stevens", HomeField = "TD garden" }, new Team { Id = 2, Name = "Angeles Lakers", City = "Los Angeles", Coach = "Frank Vogel", HomeField = "Staples Center" }, new Team { Id = 3, Name = "Angeles Clippers", City = "Los Angeles", Coach = "Doc Rivers", HomeField = "Staples Center" } ); context.Players.AddRange( new Player { Id = 1, Name = "Jayson Tatum", Number = 0, Nationality = "USA", Position = "Fordward", CurrentTeam = context.Teams.FirstOrDefault(t => t.Id == 1) }, new Player { Id = 2, Name = "Lebron James", Number = 23, Nationality = "USA", Position = "Fordward", CurrentTeam = context.Teams.FirstOrDefault(t => t.Id == 2) }, new Player { Id = 3, Name = "Kawhi Leonard", Number = 2, Nationality = "USA", Position = "Fordward", CurrentTeam = context.Teams.FirstOrDefault(t => t.Id == 3) } ); context.SaveChanges(); }
public PdfReporterPlayer(NbaContext context) { this.dbContext = context; }
public PdfReporterTeam(NbaContext context) { this.dbContext = context; }
public void Start() { int input = 7; while (input != 0) { PrintMenu.MainMenu(); input = Input(); PrintDelimeter(); switch (input) { case 1: PrintMenu.CreateMenu(); input = Input(); CreateCommandMenu(input); break; case 2: PrintMenu.ReadMenu(); input = Input(); ReadCommandMenu(input); break; case 3: PrintMenu.UpdateMenu(); input = Input(); UpdateCommandMenu(input); break; case 4: PrintMenu.DeleteMenu(); input = Input(); DeleteCommandMenu(input); break; case 5: var context = new NbaContext(); var pdfT = new PdfReporterTeam(context); var pdfP = new PdfReporterPlayer(context); var pdfPS = new PdfReporterPlayerStats(context); pdfT.GenerateReport("../../REPORTS"); pdfP.GenerateReport("../../REPORTS"); pdfPS.GenerateReport("../../REPORTS"); break; case 6: commandFactory.FillDataBase(); break; case 0: Environment.Exit(0); break; default: this.writer.WriteLine("Incorect Input value"); break; } PrintDelimeter(); } }
public PlayerStatisticRepository(NbaContext context) : base(context) { }
public TeamRepository(NbaContext context) : base(context) { }
public ConferenceRepository(NbaContext context) : base(context) { }
public DevisionRepository(NbaContext context) : base(context) { }
public TeamRepository(NbaContext context) { _context = context; }