update to use IRepository<T>
This commit is contained in:
@@ -12,13 +12,13 @@ namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Han
|
||||
/// </summary>
|
||||
public class RemoveHistoryHandler : INotificationHandler<RemoveSignatureNotification>
|
||||
{
|
||||
private readonly IRepository _repo;
|
||||
private readonly IRepository<Domain.Entities.History> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public RemoveHistoryHandler(IRepository repository)
|
||||
public RemoveHistoryHandler(IRepository<Domain.Entities.History> repository)
|
||||
{
|
||||
_repo = repository;
|
||||
}
|
||||
@@ -31,9 +31,9 @@ public class RemoveHistoryHandler : INotificationHandler<RemoveSignatureNotifica
|
||||
/// <returns></returns>
|
||||
public async Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||
{
|
||||
await _repo.DeleteAsync<Domain.Entities.History>(hists
|
||||
await _repo.DeleteAsync(hists
|
||||
=> hists
|
||||
.Where(hist => hist.EnvelopeId == notification.EnvelopeId)
|
||||
.Where(hist => hist.Envelope!.Uuid == notification.EnvelopeUuid)
|
||||
.Where(hist => hist.Status == EnvelopeStatus.DocumentSigned)
|
||||
, cancel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user