コード例 #1
0
        public IActionResult GetVenueSections(int venueId)
        {
            SectionRepository sectionRepo = new SectionRepository(_context);
            var venue = _context.Venue.FirstOrDefault(v => v.VenueId == venueId);

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

            return(Ok(sectionRepo.GetVenueSections(venue)));
        }