mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -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
|
@ -41,5 +41,6 @@ namespace PlexRequests.Core
|
|||
RequestedModel Get(int id);
|
||||
IEnumerable<RequestedModel> GetAll();
|
||||
bool BatchUpdate(List<RequestedModel> model);
|
||||
bool BatchDelete(List<RequestedModel> model);
|
||||
}
|
||||
}
|
|
@ -107,5 +107,11 @@ namespace PlexRequests.Core
|
|||
var entities = model.Select(m => new RequestBlobs { Type = m.Type, Content = ByteConverterHelper.ReturnBytes(m), ProviderId = m.ProviderId, Id = m.Id }).ToList();
|
||||
return Repo.UpdateAll(entities);
|
||||
}
|
||||
|
||||
public bool BatchDelete(List<RequestedModel> model)
|
||||
{
|
||||
var entities = model.Select(m => new RequestBlobs { Type = m.Type, Content = ByteConverterHelper.ReturnBytes(m), ProviderId = m.ProviderId, Id = m.Id }).ToList();
|
||||
return Repo.DeleteAll(entities);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue