public async Task OnGetAsync(GetSamplesByFilterQuery query, CancellationToken cancellationToken = default(CancellationToken))
        {
            var response = await Mediator.Send(query, cancellationToken);

            Samples = response.GetModels()
                      .ToList()
                      .Select(model => new SampleModel(model))
                      .ToList();
        }
 public async Task <ActionResult <GetSamplesByFilterQueryResponse> > Get(GetSamplesByFilterQuery request, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await Mediator.Send(request, cancellationToken));
 }
Пример #3
0
 public async Task <ActionResult <GetSamplesByFilterQueryResponse> > Get(GetSamplesByFilterQuery query, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await Send(query, cancellationToken));
 }