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));
        }
示例#2
0
 public Task <PageModel <SessionFormatModel> > Handle(GetSessionFormatsByEventId query, CancellationToken cancellationToken)
 {
     return(Repository.GetAllForEvent(query, cancellationToken));
 }