From 7efccb5fd0a2027aa0e7671c1074b144e21aca17 Mon Sep 17 00:00:00 2001 From: Ethan Hair Date: Thu, 21 Sep 2023 13:23:24 -0500 Subject: [PATCH] Adding DeleteWhereAsync to the IRepository interface --- src/Interfaces/IRepository.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Interfaces/IRepository.cs b/src/Interfaces/IRepository.cs index fbe92ea..1abfdb1 100644 --- a/src/Interfaces/IRepository.cs +++ b/src/Interfaces/IRepository.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; @@ -56,6 +57,13 @@ public interface IRepository : IReadOnlyRepository /// A representing the work of deleting Task DeleteAsync(T entity, CancellationToken cancellationToken = default); + /// + /// Deletes a set of entities satisfying a provided expression + /// + /// The expression to filter the entities + /// A representing the work of deleting + Task DeleteWhereAsync(Expression> predicate, CancellationToken cancellationToken = default); + /// /// Simply saves any changes to all currently tracked entities without needing /// to pass in a entity.