示例#1
0
        //GET api/Events/GetResultsForEvent
        public IHttpActionResult GetResultsForEvent(int eventId)
        {
            var _event = _eventRepo.GetEvent(eventId);

            if (_event == null)
            {
                return(BadRequest("Invalid event Id, event not found"));
            }
            var eventResultsToView = EventResultsToView(_event);

            return(Ok(eventResultsToView));
        }
示例#2
0
        public ActionResult GetEvent(int id)
        {
            var bde = repo.GetEvent(id);

            if (bde == null)
            {
                return(NotFound());
            }
            return(Ok(bde));
        }