Beispiel #1
0
        public async Task <ActionResult <PageModel <VenueModel> > > GetAll([FromRoute] Guid eventId, CancellationToken cancellationToken)
        {
            var query = new GetVenuesByEventId(eventId);

            var result = await Mediator.Execute <GetVenuesByEventId, PageModel <VenueModel> >(query, cancellationToken);

            return(Ok(result));
        }
Beispiel #2
0
 public Task <PageModel <VenueModel> > Handle(GetVenuesByEventId query, CancellationToken cancellationToken)
 {
     return(Repository.GetAllForEvent(query, cancellationToken));
 }