Пример #1
0
 public async Task GenerateAsync <TDataReport>(int templateId, TDataReport dataReport, CancellationToken cancellationToken, bool captureContext = false)
     where TDataReport : class
 =>
 await _periodCartReportEntitiesRepository.CreateAsync(new PeriodCartReport
 {
     CreationDate = DateTimeOffset.UtcNow,
     Body         = await _templatingService.RenderAsync(templateId, new { Result = dataReport }, cancellationToken, captureContext)
                    .ConfigureAwait(captureContext)
 }, cancellationToken, captureContext).ConfigureAwait(captureContext);