예제 #1
0
        public IActionResult GetUpcomingEvents(int venueId)
        {
            VenueRepository venueRepo = new VenueRepository(_context);
            var             venue     = _context.Venue.FirstOrDefault(v => v.VenueId == venueId);

            if (venue == null)
            {
                return(NotFound($"Venue '{venueId}' Not Found"));
            }

            return(new ObjectResult(venueRepo.GetEvents(venue)));
        }