Added transactions around all of the CUD operations

This commit is contained in:
Jamie Rees 2019-06-19 21:39:08 +01:00
parent 135e9842f6
commit 1fa034908c
16 changed files with 347 additions and 194 deletions

View file

@ -8,9 +8,9 @@ using Ombi.Store.Entities.Requests;
namespace Ombi.Store.Repository.Requests
{
public class TvRequestRepository : ITvRequestRepository
public class TvRequestRepository : BaseRepository<TvRequests, IOmbiContext>, ITvRequestRepository
{
public TvRequestRepository(IOmbiContext ctx)
public TvRequestRepository(IOmbiContext ctx) : base(ctx)
{
Db = ctx;
}
@ -151,10 +151,5 @@ namespace Ombi.Store.Repository.Requests
await InternalSaveChanges();
}
private async Task<int> InternalSaveChanges()
{
return await Db.SaveChangesAsync();
}
}
}