コード例 #1
0
 public PlayerRepository(NbaContext context)
     : base(context)
 {
 }
コード例 #2
0
 public Repository(NbaContext context)
 {
     this.context = context;
 }
コード例 #3
0
 public PlayerRepository(NbaContext context)
 {
     _context = context;
 }
コード例 #4
0
 public LeagueRepository(NbaContext context) : base(context)
 {
 }
コード例 #5
0
ファイル: DataSeeder.cs プロジェクト: pleongomez/graphql-poc
        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();
        }
コード例 #6
0
 public PdfReporterPlayer(NbaContext context)
 {
     this.dbContext = context;
 }
コード例 #7
0
 public PdfReporterTeam(NbaContext context)
 {
     this.dbContext = context;
 }
コード例 #8
0
        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)
 {
 }
コード例 #10
0
 public TeamRepository(NbaContext context)
     : base(context)
 {
 }
コード例 #11
0
 public ConferenceRepository(NbaContext context)
     : base(context)
 {
 }
コード例 #12
0
 public DevisionRepository(NbaContext context) : base(context)
 {
 }
コード例 #13
0
 public TeamRepository(NbaContext context)
 {
     _context = context;
 }