public async Task <ActionResult <PageModel <SessionFormatModel> > > GetAll([FromRoute] Guid eventId, CancellationToken cancellationToken) { var query = new GetSessionFormatsByEventId(eventId); var result = await Mediator.Execute <GetSessionFormatsByEventId, PageModel <SessionFormatModel> >(query, cancellationToken); return(Ok(result)); }
public Task <PageModel <SessionFormatModel> > Handle(GetSessionFormatsByEventId query, CancellationToken cancellationToken) { return(Repository.GetAllForEvent(query, cancellationToken)); }