コード例 #1
0
 public Task <IEnumerable <string> > Handle(DefaultGetQuery request, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new List <string> {
         "Cheguei aqui via MediatR"
     } as IEnumerable <string>));
 }
コード例 #2
0
        public async Task <IEnumerable <string> > Get()
        {
            var query = new DefaultGetQuery();

            return(await _mediator.Send(query));
        }