public ActionResult <IEnumerable <EventDTO> > GetAllEventsByVenue(int id) { var query = new AllEventsByVenueIdQuery(id); var handler = _queryHandler.Build(query); return(Ok(_mapper.Map <IEnumerable <EventDTO> >(handler.Get()))); }
public AllEventsByVenueIdQueryHandler(IEventService service, AllEventsByVenueIdQuery query) { _service = service; _query = query; }
public IQueryHandler <AllEventsByVenueIdQuery, IEnumerable <Event> > Build(AllEventsByVenueIdQuery query) { return(new AllEventsByVenueIdQueryHandler(_service, query)); }