mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Merge pull request #2081 from tidusjar/develop
Merge Develop to RecentlyAdded
This commit is contained in:
commit
0e94270f84
42 changed files with 700 additions and 80 deletions
|
@ -10,10 +10,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.9" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -22,5 +22,7 @@ namespace Ombi.Store.Repository
|
|||
Task DeleteEpisode(PlexEpisode content);
|
||||
void DeleteWithoutSave(PlexServerContent content);
|
||||
void DeleteWithoutSave(PlexEpisode content);
|
||||
Task UpdateRange(IEnumerable<PlexServerContent> existingContent);
|
||||
void UpdateWithoutSave(PlexServerContent existingContent);
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Ombi.Store.Entities;
|
||||
|
||||
|
@ -24,5 +25,6 @@ namespace Ombi.Store.Repository
|
|||
where TEntity : class;
|
||||
|
||||
Task ExecuteSql(string sql);
|
||||
DbSet<T> _db { get; }
|
||||
}
|
||||
}
|
|
@ -97,6 +97,16 @@ namespace Ombi.Store.Repository
|
|||
Db.PlexServerContent.Update(existingContent);
|
||||
await Db.SaveChangesAsync();
|
||||
}
|
||||
public void UpdateWithoutSave(PlexServerContent existingContent)
|
||||
{
|
||||
Db.PlexServerContent.Update(existingContent);
|
||||
}
|
||||
|
||||
public async Task UpdateRange(IEnumerable<PlexServerContent> existingContent)
|
||||
{
|
||||
Db.PlexServerContent.UpdateRange(existingContent);
|
||||
await Db.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public IQueryable<PlexEpisode> GetAllEpisodes()
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Ombi.Store.Repository
|
|||
_ctx = ctx;
|
||||
_db = _ctx.Set<T>();
|
||||
}
|
||||
private readonly DbSet<T> _db;
|
||||
public DbSet<T> _db { get; }
|
||||
private readonly IOmbiContext _ctx;
|
||||
|
||||
public async Task<T> Find(object key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue