mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-30 10:55:16 -04:00
Adding a delete range and fixing show's editing
This commit is contained in:
@@ -218,7 +218,7 @@ namespace Kyoo.Controllers
|
||||
}
|
||||
|
||||
public abstract Task Delete(T obj);
|
||||
|
||||
|
||||
public virtual async Task DeleteRange(IEnumerable<T> objs)
|
||||
{
|
||||
foreach (T obj in objs)
|
||||
@@ -236,5 +236,11 @@ namespace Kyoo.Controllers
|
||||
foreach (string slug in slugs)
|
||||
await Delete(slug);
|
||||
}
|
||||
|
||||
public async Task DeleteRange(Expression<Func<T, bool>> where)
|
||||
{
|
||||
ICollection<T> resources = await GetAll(where);
|
||||
await DeleteRange(resources);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user