예제 #1
0
        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())));
        }
예제 #2
0
 public AllEventsByVenueIdQueryHandler(IEventService service, AllEventsByVenueIdQuery query)
 {
     _service = service;
     _query   = query;
 }
 public IQueryHandler <AllEventsByVenueIdQuery, IEnumerable <Event> > Build(AllEventsByVenueIdQuery query)
 {
     return(new AllEventsByVenueIdQueryHandler(_service, query));
 }