Ejemplo n.º 1
0
        public async Task <ActionResult <IList <EventDetailsModel> > > GetEventDetail(int id)
        {
            try
            {
                var events = await _eventDetailRepository.GetAllEvents(id);

                if (events == null)
                {
                    return(NotFound());
                }

                return(Ok(events));
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, "Database error"));
            }
        }