mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-15 01:32:55 -07:00
parent
2d7ded325f
commit
698356d55e
7 changed files with 158 additions and 58 deletions
|
@ -65,6 +65,14 @@ namespace Ombi.Store.Repository
|
|||
}
|
||||
}
|
||||
|
||||
public T Custom(Func<IDbConnection, T> func)
|
||||
{
|
||||
using (var cnn = Connection)
|
||||
{
|
||||
return func(cnn);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<T>> CustomAsync(Func<IDbConnection, Task<IEnumerable<T>>> func)
|
||||
{
|
||||
using (var cnn = Connection)
|
||||
|
@ -72,6 +80,13 @@ namespace Ombi.Store.Repository
|
|||
return await func(cnn);
|
||||
}
|
||||
}
|
||||
public async Task<T> CustomAsync(Func<IDbConnection, Task<T>> func)
|
||||
{
|
||||
using (var cnn = Connection)
|
||||
{
|
||||
return await func(cnn);
|
||||
}
|
||||
}
|
||||
|
||||
public long Insert(T entity)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue