Exemplo n.º 1
0
        // GET: Fixtures
        public async Task <IActionResult> Index()
        {
            Task <List <Fixture> > fixtures = _fixtureRepository.GetAll();

            List <VM_Fixture> vm_fixtures = new List <VM_Fixture>();

            foreach (Fixture fixture in await fixtures)
            {
                vm_fixtures.Add(new VM_Fixture
                {
                    MatchDetails = fixture.FixtureDateTime.ToString("d MMM H:mm") + " / " + fixture.Home + " vs " + fixture.Away,
                    Score        = fixture.HomeScore + " - " + fixture.AwayScore
                }
                                );
            }

            return(View(vm_fixtures));
        }
Exemplo n.º 2
0
 public IEnumerable <TFixture> Get()
 {
     return(FixtureRepository.GetAll <TFixture, TAvailableSources>());
 }