예제 #1
0
        private void CreateFixture(int season, int week, string type, string homeTeam, string awayTeam)
        {
            FixturesDocument newFixture = new FixturesDocument()
            {
                Season     = season,
                Week       = week,
                Type       = type,
                HomeTeamId = homeTeam,
                AwayTeamId = awayTeam,
                Played     = false,
                HomeScore  = 0,
                AwayScore  = 0
            };

            _fixturesService.Create(newFixture);
        }
예제 #2
0
        public ActionResult <FixturesDocument> CreateFixture(FixturesDocument fixture)
        {
            _fixturesService.Create(fixture);

            return(CreatedAtRoute("GetFixture", new { id = fixture.Id.ToString() }, fixture));
        }