First pass at the plex update service

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

View file

@ -26,6 +26,7 @@
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using Dapper.Contrib.Extensions;
@ -89,5 +90,19 @@ namespace PlexRequests.Store
return db.Update(entity);
}
}
public bool UpdateAll(IEnumerable<T> entity)
{
var result = new HashSet<bool>();
using (var db = Config.DbConnection())
{
db.Open();
foreach (var e in entity)
{
result.Add(db.Update(e));
}
}
return result.All(x => true);
}
}
}