refactor(EnvelopeHistory): rename as History

This commit is contained in:
tekh 2025-09-09 18:57:38 +02:00
parent ae669d05e7
commit e8f2c868b1
26 changed files with 65 additions and 65 deletions

View File

@ -24,7 +24,7 @@ public class MappingProfile : Profile
{
// Entity to DTO mappings
CreateMap<Config, ConfigDto>();
CreateMap<DocumentReceiverElement, SignatureDto>();
CreateMap<Signature, SignatureDto>();
CreateMap<DocumentStatus, DocumentStatusDto>();
CreateMap<EmailTemplate, EmailTemplateDto>();
CreateMap<Envelope, EnvelopeDto>();
@ -40,7 +40,7 @@ public class MappingProfile : Profile
// DTO to Entity mappings
CreateMap<ConfigDto, Config>();
CreateMap<SignatureDto, DocumentReceiverElement>();
CreateMap<SignatureDto, Signature>();
CreateMap<DocumentStatusDto, DocumentStatus>();
CreateMap<EmailTemplateDto, EmailTemplate>();
CreateMap<EnvelopeDto, Envelope>();

View File

@ -52,7 +52,7 @@ public record CreateHistoryCommand : EnvelopeReceiverQueryBase, IRequest<Envelop
/// </summary>
public class CreateHistoryCommandHandler : IRequestHandler<CreateHistoryCommand, EnvelopeHistoryDto?>
{
private readonly IRepository<EnvelopeHistory> _repo;
private readonly IRepository<History> _repo;
private readonly IRepository<EnvelopeReceiver> _erRepo;
@ -64,7 +64,7 @@ public class CreateHistoryCommandHandler : IRequestHandler<CreateHistoryCommand,
/// <param name="repo"></param>
/// <param name="erRepo"></param>
/// <param name="mapper"></param>
public CreateHistoryCommandHandler(IRepository<EnvelopeHistory> repo, IRepository<EnvelopeReceiver> erRepo, IMapper mapper)
public CreateHistoryCommandHandler(IRepository<History> repo, IRepository<EnvelopeReceiver> erRepo, IMapper mapper)
{
_repo = repo;
_erRepo = erRepo;

View File

@ -14,7 +14,7 @@ public class MappingProfile: Profile
/// </summary>
public MappingProfile()
{
CreateMap<CreateHistoryCommand, EnvelopeHistory>()
CreateMap<CreateHistoryCommand, History>()
.ForMember(dest => dest.Envelope, opt => opt.Ignore())
.ForMember(dest => dest.Sender, opt => opt.Ignore())
.ForMember(dest => dest.Receiver, opt => opt.Ignore());

View File

@ -13,7 +13,7 @@ namespace EnvelopeGenerator.Application.Histories.Queries;
/// </summary>
public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumerable<EnvelopeHistoryDto>>
{
private readonly IRepository<EnvelopeHistory> _repo;
private readonly IRepository<History> _repo;
private readonly IMapper _mapper;
@ -22,7 +22,7 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
/// </summary>
/// <param name="repo"></param>
/// <param name="mapper"></param>
public ReadHistoryQueryHandler(IRepository<EnvelopeHistory> repo, IMapper mapper)
public ReadHistoryQueryHandler(IRepository<History> repo, IMapper mapper)
{
_repo = repo;
_mapper = mapper;

View File

@ -6,6 +6,6 @@ namespace EnvelopeGenerator.Application.Interfaces.Repositories;
///
/// </summary>
[Obsolete("Use IRepository")]
public interface IDocumentReceiverElementRepository : ICRUDRepository<DocumentReceiverElement, int>
public interface IDocumentReceiverElementRepository : ICRUDRepository<Signature, int>
{
}

View File

@ -8,7 +8,7 @@ namespace EnvelopeGenerator.Application.Interfaces.Repositories;
///
/// </summary>
[Obsolete("Use IRepository")]
public interface IEnvelopeHistoryRepository : ICRUDRepository<EnvelopeHistory, long>
public interface IEnvelopeHistoryRepository : ICRUDRepository<History, long>
{
/// <summary>
///
@ -28,5 +28,5 @@ public interface IEnvelopeHistoryRepository : ICRUDRepository<EnvelopeHistory, l
/// <param name="withSender"></param>
/// <param name="withReceiver"></param>
/// <returns></returns>
Task<IEnumerable<EnvelopeHistory>> ReadAsync(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false);
Task<IEnumerable<History>> ReadAsync(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false);
}

View File

@ -8,6 +8,6 @@ namespace EnvelopeGenerator.Application.Interfaces.Services;
///
/// </summary>
[Obsolete("Use MediatR")]
public interface IDocumentReceiverElementService : IBasicCRUDService<SignatureDto, DocumentReceiverElement, int>
public interface IDocumentReceiverElementService : IBasicCRUDService<SignatureDto, Signature, int>
{
}

View File

@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Interfaces.Services;
///
/// </summary>
[Obsolete("Use MediatR")]
public interface IEnvelopeHistoryService : ICRUDService<EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistory, long>
public interface IEnvelopeHistoryService : ICRUDService<EnvelopeHistoryCreateDto, EnvelopeHistoryDto, History, long>
{
/// <summary>
///

View File

@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Services;
///
/// </summary>
[Obsolete("Use MediatR")]
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, SignatureDto, DocumentReceiverElement, int>, IDocumentReceiverElementService
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, SignatureDto, Signature, int>, IDocumentReceiverElementService
{
/// <summary>
///

View File

@ -14,7 +14,7 @@ namespace EnvelopeGenerator.Application.Services;
///
/// </summary>
[Obsolete("Use MediatR")]
public class EnvelopeHistoryService : CRUDService<IEnvelopeHistoryRepository, EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistory, long>, IEnvelopeHistoryService
public class EnvelopeHistoryService : CRUDService<IEnvelopeHistoryRepository, EnvelopeHistoryCreateDto, EnvelopeHistoryDto, History, long>, IEnvelopeHistoryService
{
/// <summary>
///

View File

@ -10,8 +10,8 @@ Public Class ElementModel
MyBase.New(pState)
End Sub
Private Function ToElement(pRow As DataRow) As DocumentReceiverElement
Return New DocumentReceiverElement() With {
Private Function ToElement(pRow As DataRow) As Signature
Return New Signature() With {
.Id = pRow.ItemEx("GUID", 0),
.DocumentId = pRow.ItemEx("DOCUMENT_ID", 0),
.ReceiverId = pRow.ItemEx("RECEIVER_ID", 0),
@ -24,7 +24,7 @@ Public Class ElementModel
}
End Function
Private Function ToElements(pTable As DataTable) As List(Of DocumentReceiverElement)
Private Function ToElements(pTable As DataTable) As List(Of Signature)
Return pTable?.Rows.Cast(Of DataRow).
Select(AddressOf ToElement).
ToList()
@ -80,7 +80,7 @@ Public Class ElementModel
End Try
End Function
Public Function List(pDocumentId As Integer) As List(Of DocumentReceiverElement)
Public Function List(pDocumentId As Integer) As List(Of Signature)
Try
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT] WHERE DOCUMENT_ID = {pDocumentId} ORDER BY PAGE ASC"
Dim oTable = Database.GetDatatable(oSql)
@ -93,7 +93,7 @@ Public Class ElementModel
End Try
End Function
Public Function List(pDocumentId As Integer, pReceiverId As Integer) As List(Of DocumentReceiverElement)
Public Function List(pDocumentId As Integer, pReceiverId As Integer) As List(Of Signature)
Try
Dim oReceiverConstraint = ""
If pReceiverId > 0 Then
@ -111,7 +111,7 @@ Public Class ElementModel
End Try
End Function
Public Function Insert(pElement As DocumentReceiverElement) As Boolean
Public Function Insert(pElement As Signature) As Boolean
Try
Dim oSql = "INSERT INTO [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]
([DOCUMENT_ID]
@ -161,7 +161,7 @@ Public Class ElementModel
End Try
End Function
Public Function Update(pElement As DocumentReceiverElement) As Boolean
Public Function Update(pElement As Signature) As Boolean
Try
Dim oSql = "UPDATE [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]
SET [POSITION_X] = @POSITION_X
@ -185,7 +185,7 @@ Public Class ElementModel
End Try
End Function
Private Function GetElementId(pElement As DocumentReceiverElement) As Integer
Private Function GetElementId(pElement As Signature) As Integer
Try
Return Database.GetScalarValue($"SELECT MAX(GUID) FROM TBSIG_DOCUMENT_RECEIVER_ELEMENT
WHERE DOCUMENT_ID = {pElement.DocumentId} AND RECEIVER_ID = {pElement.ReceiverId}")
@ -196,7 +196,7 @@ Public Class ElementModel
End Try
End Function
Public Function DeleteElement(pElement As DocumentReceiverElement) As Boolean
Public Function DeleteElement(pElement As Signature) As Boolean
Try
Dim oSql = $"DELETE FROM TBSIG_DOCUMENT_RECEIVER_ELEMENT WHERE GUID = {pElement.Id}"
Return Database.ExecuteNonQuery(oSql)

View File

@ -10,8 +10,8 @@ Public Class HistoryModel
MyBase.New(pState)
End Sub
Private Function ToEnvelopeHistoryEntry(pRow As DataRow) As EnvelopeHistory
Return New EnvelopeHistory() With {
Private Function ToEnvelopeHistoryEntry(pRow As DataRow) As History
Return New History() With {
.ActionDate = pRow.ItemEx(Of Date)("ACTION_DATE", Nothing),
.EnvelopeId = pRow.Item("ENVELOPE_ID"),
.Status = pRow.Item("STATUS"),
@ -19,7 +19,7 @@ Public Class HistoryModel
}
End Function
Public Function List(pEnvelopeId As Integer) As List(Of EnvelopeHistory)
Public Function List(pEnvelopeId As Integer) As List(Of History)
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE_HISTORY WHERE ENVELOPE_ID = {pEnvelopeId} AND ACTION_DATE IS NOT NULL ORDER BY GUID DESC"
Dim oTable = Database.GetDatatable(oSql)
Return oTable?.Rows.
@ -41,7 +41,7 @@ Public Class HistoryModel
Return oRowCount > 0
End Function
Public Function Insert(pHistory As EnvelopeHistory) As Boolean
Public Function Insert(pHistory As History) As Boolean
Try
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE_HISTORY] "
oSql += " ([ENVELOPE_ID] "

View File

@ -18,7 +18,7 @@ Public Class HistoryService
End Sub
Public Function SetEnvelopeStatus(pEnvelope As Envelope, pStatus As EnvelopeStatus, pUserReference As String) As Boolean
Dim oResult = HistoryModel.Insert(New EnvelopeHistory() With {
Dim oResult = HistoryModel.Insert(New History() With {
.EnvelopeId = pEnvelope.Id,
.ActionDate = Now(),
.Status = pStatus,

View File

@ -19,7 +19,7 @@ public class Document
public Document()
{
#if NETFRAMEWORK
Elements = Enumerable.Empty<DocumentReceiverElement>().ToList();
Elements = Enumerable.Empty<Signature>().ToList();
#endif
}
@ -35,7 +35,7 @@ public class Document
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
public byte[] ByteData { get; set; }
public List<DocumentReceiverElement> Elements { get; set; }
public List<Signature> Elements { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]

View File

@ -36,7 +36,7 @@ public class Envelope
CertificationType = (int)Constants.CertificationType.AdvancedElectronicSignature;
UseAccessCode = false;
Documents = Enumerable.Empty<Document>().ToList();
Histories = Enumerable.Empty<EnvelopeHistory>().ToList();
Histories = Enumerable.Empty<History>().ToList();
EnvelopeReceivers = Enumerable.Empty<EnvelopeReceiver>().ToList();
#endif
}
@ -164,7 +164,7 @@ public class Envelope
#endif
Documents { get; set; }
public List<EnvelopeHistory>
public List<History>
#if NET
?
#endif

View File

@ -17,7 +17,7 @@ namespace EnvelopeGenerator.Domain.Entities
#endif
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
public class EnvelopeHistory : IHasEnvelope, IHasReceiver
public class History : IHasEnvelope, IHasReceiver
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]

View File

@ -13,9 +13,9 @@ namespace EnvelopeGenerator.Domain.Entities
#endif
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
public class DocumentReceiverElement
public class Signature
{
public DocumentReceiverElement()
public Signature()
{
// TODO: * Check the Form App and remove the default value
#if NETFRAMEWORK

View File

@ -76,7 +76,7 @@ Public Class EnvelopeEditorController
If EnvelopeModel.Insert(oEnvelope) Then
Dim newHistoryEntry As New EnvelopeHistory With {
Dim newHistoryEntry As New History With {
.EnvelopeId = oEnvelope.Id,
.Status = EnvelopeStatus.EnvelopeCreated,
.UserReference = oEnvelope.User.Email

View File

@ -8,7 +8,7 @@ Public Class FieldEditorController
Inherits BaseController
Private ReadOnly Document As Document
Public Property Elements As New List(Of DocumentReceiverElement)
Public Property Elements As New List(Of Signature)
Public Class ElementInfo
Public ReceiverId As Integer
@ -36,7 +36,7 @@ Public Class FieldEditorController
}
End Function
Private Function GetElementByPosition(pAnnotation As AnnotationStickyNote, pPage As Integer, pReceiverId As Integer) As DocumentReceiverElement
Private Function GetElementByPosition(pAnnotation As AnnotationStickyNote, pPage As Integer, pReceiverId As Integer) As Signature
Dim oElement = Elements.
Where(Function(e)
Return e.Left = CSng(Math.Round(pAnnotation.Left, 5)) And
@ -47,12 +47,12 @@ Public Class FieldEditorController
Return oElement
End Function
Private Function GetElementByGuid(pGuid As Integer) As DocumentReceiverElement
Private Function GetElementByGuid(pGuid As Integer) As Signature
Dim oElement = Elements.Where(Function(e) pGuid = e.Id).SingleOrDefault()
Return oElement
End Function
Public Function GetElement(pAnnotation As AnnotationStickyNote) As DocumentReceiverElement
Public Function GetElement(pAnnotation As AnnotationStickyNote) As Signature
Dim oInfo = GetElementInfo(pAnnotation.Tag)
If oInfo.Guid = -1 Then
@ -85,7 +85,7 @@ Public Class FieldEditorController
Else
Dim oInfo = GetElementInfo(pAnnotation.Tag)
Elements.Add(New DocumentReceiverElement() With {
Elements.Add(New Signature() With {
.ElementType = Constants.ElementType.Signature,
.Height = oAnnotationHeight,
.Width = oAnnotationWidth,
@ -98,7 +98,7 @@ Public Class FieldEditorController
End If
End Sub
Public Function ClearElements(pPage As Integer, pReceiverId As Integer) As IEnumerable(Of DocumentReceiverElement)
Public Function ClearElements(pPage As Integer, pReceiverId As Integer) As IEnumerable(Of Signature)
Return Elements.
Where(Function(e) e.Page <> pPage And e.ReceiverId <> pReceiverId).
ToList()
@ -120,7 +120,7 @@ Public Class FieldEditorController
All(Function(pResult) pResult = True)
End Function
Public Function SaveElement(pElement As DocumentReceiverElement) As Boolean
Public Function SaveElement(pElement As Signature) As Boolean
Try
If pElement.Id > 0 Then
Return ElementModel.Update(pElement)
@ -134,11 +134,11 @@ Public Class FieldEditorController
End Try
End Function
Public Function DeleteElement(pElement As DocumentReceiverElement) As Boolean
Public Function DeleteElement(pElement As Signature) As Boolean
Try
' Element aus Datenbank löschen
If ElementModel.DeleteElement(pElement) Then
Dim oElement = New List(Of DocumentReceiverElement)() From {pElement}
Dim oElement = New List(Of Signature)() From {pElement}
Elements = Elements.Except(oElement).ToList()
Return True
Else

View File

@ -280,7 +280,7 @@ Partial Public Class frmFieldEditor
End If
End Sub
Private Sub LoadAnnotation(pElement As DocumentReceiverElement, pReceiverId As Integer)
Private Sub LoadAnnotation(pElement As Signature, pReceiverId As Integer)
Dim oAnnotation As AnnotationStickyNote = Manager.AddStickyNoteAnnot(0, 0, 0, 0, "SIGNATUR")
Dim oPage = pElement.Page
Dim oReceiver = Receivers.Where(Function(r) r.Id = pReceiverId).Single()

View File

@ -234,7 +234,7 @@ public class EnvelopeReceiverController : ControllerBase
SELECT @OUT_SUCCESS as [@OUT_SUCCESS];";
foreach (var rcv in res.SentReceiver)
foreach (var sign in request.Receivers.Where(r => r.EmailAddress == rcv.EmailAddress).FirstOrDefault()?.Signatures ?? Enumerable.Empty<Signature>())
foreach (var sign in request.Receivers.Where(r => r.EmailAddress == rcv.EmailAddress).FirstOrDefault()?.Signatures ?? Enumerable.Empty<Application.EnvelopeReceivers.Commands.Signature>())
{
using SqlConnection conn = new(_cnnStr);
conn.Open();

View File

@ -57,13 +57,13 @@ public static class DIExtensions
services.AddDbRepository<EGDbContext, User>(context => context.Users).UseAutoMapper();
services.AddDbRepository<EGDbContext, Config>(context => context.Configs).UseAutoMapper();
services.AddDbRepository<EGDbContext, DocumentReceiverElement>(context => context.DocumentReceiverElements).UseAutoMapper();
services.AddDbRepository<EGDbContext, Signature>(context => context.DocumentReceiverElements).UseAutoMapper();
services.AddDbRepository<EGDbContext, Document>(context => context.EnvelopeDocument).UseAutoMapper();
services.AddDbRepository<EGDbContext, DocumentStatus>(context => context.DocumentStatus).UseAutoMapper();
services.AddDbRepository<EGDbContext, EmailTemplate>(context => context.EmailTemplate).UseAutoMapper();
services.AddDbRepository<EGDbContext, EmailOut>(context => context.EMailOuts).UseAutoMapper();
services.AddDbRepository<EGDbContext, Envelope>(context => context.Envelopes).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeHistory>(context => context.EnvelopeHistories).UseAutoMapper();
services.AddDbRepository<EGDbContext, History>(context => context.EnvelopeHistories).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeReceiver>(context => context.EnvelopeReceivers).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeType>(context => context.EnvelopeTypes).UseAutoMapper();
services.AddDbRepository<EGDbContext, Receiver>(context => context.Receivers).UseAutoMapper();
@ -72,14 +72,14 @@ public static class DIExtensions
services.AddSQLExecutor<Envelope>();
services.AddSQLExecutor<Receiver>();
services.AddSQLExecutor<Document>();
services.AddSQLExecutor<DocumentReceiverElement>();
services.AddSQLExecutor<Signature>();
services.AddSQLExecutor<DocumentStatus>();
SetDapperTypeMap<Envelope>();
SetDapperTypeMap<User>();
SetDapperTypeMap<Receiver>();
SetDapperTypeMap<Document>();
SetDapperTypeMap<DocumentReceiverElement>();
SetDapperTypeMap<Signature>();
SetDapperTypeMap<DocumentStatus>();
services.AddScoped<IEnvelopeExecutor, EnvelopeExecutor>();

View File

@ -23,7 +23,7 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
public DbSet<Envelope> Envelopes { get; set; }
public DbSet<DocumentReceiverElement> DocumentReceiverElements { get; set; }
public DbSet<Signature> DocumentReceiverElements { get; set; }
public DbSet<DocumentStatus> DocumentStatus { get; set; }
@ -31,7 +31,7 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
public DbSet<Document> EnvelopeDocument { get; set; }
public DbSet<EnvelopeHistory> EnvelopeHistories { get; set; }
public DbSet<History> EnvelopeHistories { get; set; }
public DbSet<EnvelopeType> EnvelopeTypes { get; set; }
@ -69,10 +69,10 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
Configs = Set<Config>();
EnvelopeReceivers = Set<EnvelopeReceiver>();
Envelopes = Set<Envelope>();
DocumentReceiverElements = Set<DocumentReceiverElement>();
DocumentReceiverElements = Set<Signature>();
DocumentStatus = Set<DocumentStatus>();
EnvelopeDocument = Set<Document>();
EnvelopeHistories = Set<EnvelopeHistory>();
EnvelopeHistories = Set<History>();
EnvelopeTypes = Set<EnvelopeType>();
Receivers = Set<Receiver>();
@ -139,7 +139,7 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
#endregion EnvelopeDocument
#region DocumentReceiverElement
modelBuilder.Entity<DocumentReceiverElement>()
modelBuilder.Entity<Signature>()
.HasOne(dre => dre.Document)
.WithMany(ed => ed.Elements)
.HasForeignKey(dre => dre.DocumentId);
@ -147,13 +147,13 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
if (!IsMigration)
{
modelBuilder.Entity<EnvelopeHistory>()
modelBuilder.Entity<History>()
.HasOne(eh => eh.Receiver)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
.HasPrincipalKey(e => e.EmailAddress);
modelBuilder.Entity<EnvelopeHistory>()
modelBuilder.Entity<History>()
.HasOne(eh => eh.Sender)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
@ -193,12 +193,12 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
// TODO: call add trigger methods with attributes and reflection
AddTrigger<Config>();
AddTrigger<DocumentReceiverElement>();
AddTrigger<Signature>();
AddTrigger<DocumentStatus>();
AddTrigger<EmailTemplate>();
AddTrigger<Envelope>();
AddTrigger<Document>();
AddTrigger<EnvelopeHistory>();
AddTrigger<History>();
AddTrigger<EnvelopeReceiver>();
AddTrigger<EnvelopeReceiverReadOnly>();
AddTrigger<EnvelopeType>();

View File

@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class DocumentReceiverElementRepository : CRUDRepository<DocumentReceiverElement, int, EGDbContext>, IDocumentReceiverElementRepository
public class DocumentReceiverElementRepository : CRUDRepository<Signature, int, EGDbContext>, IDocumentReceiverElementRepository
{
public DocumentReceiverElementRepository(EGDbContext dbContext) : base(dbContext, dbContext.DocumentReceiverElements)
{

View File

@ -7,13 +7,13 @@ using EnvelopeGenerator.Domain.Constants;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use TempRepo")]
public class EnvelopeHistoryRepository : CRUDRepository<EnvelopeHistory, long, EGDbContext>, IEnvelopeHistoryRepository
public class EnvelopeHistoryRepository : CRUDRepository<History, long, EGDbContext>, IEnvelopeHistoryRepository
{
public EnvelopeHistoryRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeHistories)
{
}
private IQueryable<EnvelopeHistory> By(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false)
private IQueryable<History> By(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false)
{
var query = _dbSet.AsNoTracking();
@ -40,7 +40,7 @@ public class EnvelopeHistoryRepository : CRUDRepository<EnvelopeHistory, long, E
userReference: userReference,
status: status).CountAsync();
public async Task<IEnumerable<EnvelopeHistory>> ReadAsync(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false)
public async Task<IEnumerable<History>> ReadAsync(int? envelopeId = null, string? userReference = null, EnvelopeStatus? status = null, bool withSender = false, bool withReceiver = false)
=> await By(
envelopeId: envelopeId,
userReference: userReference,

View File

@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Common.Dto;
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestDocumentReceiverElementController : TestControllerBase<IDocumentReceiverElementService, SignatureDto, DocumentReceiverElement, int>
public class TestDocumentReceiverElementController : TestControllerBase<IDocumentReceiverElementService, SignatureDto, Signature, int>
{
public TestDocumentReceiverElementController(ILogger<TestDocumentReceiverElementController> logger, IDocumentReceiverElementService service) : base(logger, service)
{