public async Task <ActionResult <IEnumerable <Turno> > > GetTurnos() { var query = new TurnosQuery(); var response = await this.mediator.Send(query); return(this.Ok(response)); }
public async Task <IEnumerable <Shared.Turnos.Turno> > Handle(TurnosQuery request, CancellationToken cancellationToken) { return(await this.repository.All() .ProjectTo <Shared.Turnos.Turno>(this.mapper.ConfigurationProvider) .ToListAsync(cancellationToken)); }