Exemple #1
0
        //GET api/Events/GetResultsForMeet
        public IHttpActionResult GetResultsForMeet(int meetId)
        {
            var events = _eventRepo.GetEventsByMeetId(meetId);

            if (events.Count == 0)
            {
                return(BadRequest("No events for that meet"));
            }

            var eventResultsToView = new List <EventResultView>();

            foreach (var _event in events)
            {
                eventResultsToView.AddRange(EventResultsToView(_event));
            }

            return(Ok(eventResultsToView));
        }