First pass at the plex update service

This commit is contained in:
tidusjar 2016-03-07 13:08:30 +00:00
commit 7636409790
25 changed files with 661 additions and 16 deletions

View file

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

View file

@ -62,6 +62,16 @@ namespace PlexRequests.Core
Repo.Update(model);
}
/// <summary>
/// Updates all the entities. NOTE: we need to Id to be the original entity
/// </summary>
/// <param name="model">The model.</param>
/// <returns></returns>
public bool BatchUpdate(List<RequestedModel> model)
{
return Repo.UpdateAll(model);
}
public RequestedModel Get(int id)
{
return Repo.Get(id);