Refactor to use EnvelopeDto in report generation
Updated ReportCreator and ReportItem to accept EnvelopeDto instead of Envelope, promoting better separation of concerns and improved data handling via DTOs.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using DevExpress.Xpo;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.ServiceHost.Exceptions;
|
||||
|
||||
@@ -7,7 +8,7 @@ namespace EnvelopeGenerator.ServiceHost.Jobs.FinalizeDocument;
|
||||
|
||||
public class ReportCreator(IRepository<EnvelopeReport> reportRepo)
|
||||
{
|
||||
public async Task<byte[]> CreateReportAsync(Envelope envelope, CancellationToken cancel = default)
|
||||
public async Task<byte[]> CreateReportAsync(EnvelopeDto envelope, CancellationToken cancel = default)
|
||||
{
|
||||
var reports = await reportRepo.Where(r => r.EnvelopeId == envelope.Id).ToListAsync(cancel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user