#221 delete requests per category

This commit is contained in:
Drewster727 2016-05-27 02:21:54 -05:00
commit 217ce391e0
10 changed files with 169 additions and 8 deletions

View file

@ -41,5 +41,6 @@ namespace PlexRequests.Core
RequestedModel Get(int id);
IEnumerable<RequestedModel> GetAll();
bool BatchUpdate(List<RequestedModel> model);
bool BatchDelete(List<RequestedModel> model);
}
}

View file

@ -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);
}
}
}