Esempio n. 1
0
        public async Task <IEnumerable <Event> > Get()
        {
            var query    = new AllEventsQuery();
            var speakers = await _queryProcessor.ProcessAsync(query);

            return(speakers);
        }
Esempio n. 2
0
        public ActionResult <IEnumerable <EventDTO> > GetAll()
        {
            var query   = new AllEventsQuery();
            var handler = _queryHandler.Build(query);

            return(Ok(_mapper.Map <IEnumerable <EventDTO> >(handler.Get())));
        }
 public async Task<IEnumerable<Event>> Get()
 {
     var query = new AllEventsQuery();
     var speakers = await _queryProcessor.ProcessAsync(query);
     return speakers;
 }
 public IQueryHandler <AllEventsQuery, IEnumerable <Event> > Build(AllEventsQuery query)
 {
     return(new AllEventsQueryHandler(_service));
 }
        public async Task <IEnumerable <Event> > ExecuteAsync(AllEventsQuery query)
        {
            var result = await _tableClient.GetItemsOf <Event>();

            return(result);
        }
Esempio n. 6
0
        public Task <IQueryable <Event> > Handle(AllEventsQuery request, CancellationToken cancellationToken)
        {
            var events = _eventRepository.GetAll();

            return(Task.FromResult(events));
        }