mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
#221 delete requests per category
This commit is contained in:
parent
96352e14ee
commit
217ce391e0
10 changed files with 169 additions and 8 deletions
|
@ -53,6 +53,8 @@ namespace PlexRequests.Store.Repository
|
|||
/// <returns></returns>
|
||||
bool Delete(RequestBlobs entity);
|
||||
|
||||
bool DeleteAll(IEnumerable<RequestBlobs> entity);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the specified entity.
|
||||
/// </summary>
|
||||
|
|
|
@ -122,5 +122,20 @@ namespace PlexRequests.Store.Repository
|
|||
}
|
||||
return result.All(x => true);
|
||||
}
|
||||
|
||||
public bool DeleteAll(IEnumerable<RequestBlobs> entity)
|
||||
{
|
||||
ResetCache();
|
||||
var result = new HashSet<bool>();
|
||||
using (var db = Db.DbConnection())
|
||||
{
|
||||
db.Open();
|
||||
foreach (var e in entity)
|
||||
{
|
||||
result.Add(db.Delete(e));
|
||||
}
|
||||
}
|
||||
return result.All(x => true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue