diff --git a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDocumentDto.cs b/EnvelopeGenerator.Application/Common/Dto/DocumentDto.cs
similarity index 96%
rename from EnvelopeGenerator.Application/Common/Dto/EnvelopeDocumentDto.cs
rename to EnvelopeGenerator.Application/Common/Dto/DocumentDto.cs
index 87c92c93..a6d705d7 100644
--- a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDocumentDto.cs
+++ b/EnvelopeGenerator.Application/Common/Dto/DocumentDto.cs
@@ -6,7 +6,7 @@ namespace EnvelopeGenerator.Application.Common.Dto;
/// Data Transfer Object representing a document within an envelope, including optional binary data and form elements.
///
[ApiExplorerSettings(IgnoreApi = true)]
-public class EnvelopeDocumentDto
+public class DocumentDto
{
///
/// Gets or sets the unique identifier of the document.
diff --git a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
index 6cccb628..8229bc50 100644
--- a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
+++ b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
@@ -117,5 +117,5 @@ public record EnvelopeDto
///
///
///
- public IEnumerable? Documents { get; set; }
+ public IEnumerable? Documents { get; set; }
}
\ No newline at end of file
diff --git a/EnvelopeGenerator.Application/Common/Dto/MappingProfile.cs b/EnvelopeGenerator.Application/Common/Dto/MappingProfile.cs
index e23ccb00..858e4fb3 100644
--- a/EnvelopeGenerator.Application/Common/Dto/MappingProfile.cs
+++ b/EnvelopeGenerator.Application/Common/Dto/MappingProfile.cs
@@ -28,7 +28,7 @@ public class MappingProfile : Profile
CreateMap();
CreateMap();
CreateMap();
- CreateMap();
+ CreateMap();
CreateMap();
CreateMap();
CreateMap();
@@ -44,7 +44,7 @@ public class MappingProfile : Profile
CreateMap();
CreateMap();
CreateMap();
- CreateMap();
+ CreateMap();
CreateMap();
CreateMap();
CreateMap();
diff --git a/EnvelopeGenerator.Application/Documents/Queries/ReadDocumentQuery.cs b/EnvelopeGenerator.Application/Documents/Queries/ReadDocumentQuery.cs
index 89f8c910..08d4432b 100644
--- a/EnvelopeGenerator.Application/Documents/Queries/ReadDocumentQuery.cs
+++ b/EnvelopeGenerator.Application/Documents/Queries/ReadDocumentQuery.cs
@@ -12,14 +12,14 @@ namespace EnvelopeGenerator.Application.Documents.Queries;
///
/// The unique identifier of the document. Optional.
/// The identifier of the envelope associated with the document. Optional.
-public record ReadDocumentQuery(int? Id = null, int? EnvelopeId = null) : IRequest
+public record ReadDocumentQuery(int? Id = null, int? EnvelopeId = null) : IRequest
{
}
///
/// Handles queries for reading data based on either the document ID or the envelope ID.
///
-public class ReadDocumentQueryHandler : IRequestHandler
+public class ReadDocumentQueryHandler : IRequestHandler
{
///
/// TempRepo for accessing entities.
@@ -40,27 +40,27 @@ public class ReadDocumentQueryHandler : IRequestHandler
- /// Handles the and returns a based on the provided identifiers.
+ /// Handles the and returns a based on the provided identifiers.
///
/// The query containing the document ID or envelope ID to search for.
/// A token to monitor for cancellation requests.
///
- /// A if a matching document is found; otherwise, null.
+ /// A if a matching document is found; otherwise, null.
///
///
/// Thrown when neither nor is provided.
///
- public async Task Handle(ReadDocumentQuery query, CancellationToken cancel)
+ public async Task Handle(ReadDocumentQuery query, CancellationToken cancel)
{
if (query.Id is not null)
{
var doc = await _repo.ReadOnly().Where(d => d.Id == query.Id).FirstOrDefaultAsync(cancel);
- return _mapper.Map(doc);
+ return _mapper.Map(doc);
}
else if (query.EnvelopeId is not null)
{
var doc = await _repo.ReadOnly().Where(d => d.EnvelopeId == query.EnvelopeId).FirstOrDefaultAsync(cancel);
- return _mapper.Map(doc);
+ return _mapper.Map(doc);
}
throw new InvalidOperationException(
diff --git a/EnvelopeGenerator.Application/Interfaces/Services/IEnvelopeDocumentService.cs b/EnvelopeGenerator.Application/Interfaces/Services/IEnvelopeDocumentService.cs
index 3b6aba8f..7a548bcf 100644
--- a/EnvelopeGenerator.Application/Interfaces/Services/IEnvelopeDocumentService.cs
+++ b/EnvelopeGenerator.Application/Interfaces/Services/IEnvelopeDocumentService.cs
@@ -8,6 +8,6 @@ namespace EnvelopeGenerator.Application.Interfaces.Services;
///
///
[Obsolete("Use MediatR")]
-public interface IEnvelopeDocumentService : IBasicCRUDService
+public interface IEnvelopeDocumentService : IBasicCRUDService
{
}
\ No newline at end of file
diff --git a/EnvelopeGenerator.Application/Services/EnvelopeDocumentService.cs b/EnvelopeGenerator.Application/Services/EnvelopeDocumentService.cs
index 6e3b1199..fe738258 100644
--- a/EnvelopeGenerator.Application/Services/EnvelopeDocumentService.cs
+++ b/EnvelopeGenerator.Application/Services/EnvelopeDocumentService.cs
@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Services;
///
///
[Obsolete("Use MediatR")]
-public class EnvelopeDocumentService : BasicCRUDService, IEnvelopeDocumentService
+public class EnvelopeDocumentService : BasicCRUDService, IEnvelopeDocumentService
{
///
///
diff --git a/EnvelopeGenerator.Web/Controllers/HomeController.cs b/EnvelopeGenerator.Web/Controllers/HomeController.cs
index a87bd545..b97e9c8c 100644
--- a/EnvelopeGenerator.Web/Controllers/HomeController.cs
+++ b/EnvelopeGenerator.Web/Controllers/HomeController.cs
@@ -170,7 +170,7 @@ public class HomeController : ViewControllerBase
if (await _historyService.IsSigned(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress))
return View("EnvelopeSigned");
- if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
+ if (er.Envelope.Documents?.FirstOrDefault() is DocumentDto doc && doc.ByteData is not null)
{
ViewData["DocumentBytes"] = doc.ByteData;
}
@@ -473,7 +473,7 @@ public class HomeController : ViewControllerBase
_logger.LogNotice(hist_res.Notices);
}
- if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
+ if (er.Envelope.Documents?.FirstOrDefault() is DocumentDto doc && doc.ByteData is not null)
{
ViewData["DocumentBytes"] = doc.ByteData;
ViewData["EnvelopeKey"] = envelopeKey;
diff --git a/EnvelopeGenerator.Web/Controllers/Test/TestEnvelopeDocumentController.cs b/EnvelopeGenerator.Web/Controllers/Test/TestEnvelopeDocumentController.cs
index 0cbec45f..cea2cdd5 100644
--- a/EnvelopeGenerator.Web/Controllers/Test/TestEnvelopeDocumentController.cs
+++ b/EnvelopeGenerator.Web/Controllers/Test/TestEnvelopeDocumentController.cs
@@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Common.Dto;
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
-public class TestEnvelopeDocumentController : TestControllerBase
+public class TestEnvelopeDocumentController : TestControllerBase
{
public TestEnvelopeDocumentController(ILogger logger, IEnvelopeDocumentService service) : base(logger, service)
{