/// <inheritdoc/>
 public virtual async Task <V1OperationalReport> GetOperationalReportAsync(DateTime?date = null, CancellationToken cancellationToken = default)
 {
     if (!date.HasValue)
     {
         date = DateTime.Now;
     }
     return(await this.Mediator.ExecuteAndUnwrapAsync(new Application.Queries.Generic.V1FindByIdQuery <V1OperationalReport, string>(V1OperationalReport.GetIdFor(date.Value)), cancellationToken));
 }
Esempio n. 2
0
 public async Task <IActionResult> Get(DateTime?date = null, CancellationToken cancellationToken = default)
 {
     if (!date.HasValue)
     {
         date = DateTime.Now;
     }
     return(this.Process(await this.Mediator.ExecuteAsync(new Application.Queries.Generic.V1FindByIdQuery <V1OperationalReport, string>(V1OperationalReport.GetIdFor(date.Value)), cancellationToken)));
 }
 /// <inheritdoc/>
 public virtual async Task <GrpcApiResult <V1OperationalReport> > GetOperationalReportAsync(GrpcApiRequest <DateTime> request, CallContext context = default)
 {
     return(GrpcApiResult.CreateFor(await this.Mediator.ExecuteAsync(new V1FindByIdQuery <V1OperationalReport, string>(V1OperationalReport.GetIdFor(request.Data)), context.CancellationToken)));
 }