mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
First pass at the plex update service
This commit is contained in:
parent
f2819664e7
commit
7636409790
25 changed files with 661 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue