Ejemplo n.º 1
0
        public EventDetail GetEvent(GetEventByIdModel model)
        {
            if (model != null && !string.IsNullOrEmpty(model.EventID))
            {
                var eventsResult = this.Get <EventDetail>($"events/{model.EventID}");

                if (!string.IsNullOrEmpty(model.SortByField))
                {
                    eventsResult.Categories = SortCategories(eventsResult, model.SortByField, model.SortMethod);
                }
                return(eventsResult);
            }
            return(null);
        }
Ejemplo n.º 2
0
 public IActionResult GetByID([FromBody] GetEventByIdModel model)
 {
     return(Ok(eventService.GetEvent(model)));
 }