mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-31 12:00:06 -07:00
Added in the external repo so we can rip out external stuff
This commit is contained in:
parent
69b573a393
commit
479ca819d7
7 changed files with 241 additions and 96 deletions
30
src/Ombi.Store/Repository/IExternalRepository.cs
Normal file
30
src/Ombi.Store/Repository/IExternalRepository.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
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;
|
||||
|
||||
namespace Ombi.Store.Repository
|
||||
{
|
||||
public interface IExternalRepository<T> : IDisposable where T : Entity
|
||||
{
|
||||
Task<T> Find(object key);
|
||||
IQueryable<T> GetAll();
|
||||
Task<T> FirstOrDefaultAsync(Expression<Func<T, bool>> predicate);
|
||||
Task AddRange(IEnumerable<T> content, bool save = true);
|
||||
Task<T> Add(T content);
|
||||
Task DeleteRange(IEnumerable<T> req);
|
||||
Task Delete(T request);
|
||||
Task<int> SaveChangesAsync();
|
||||
|
||||
IIncludableQueryable<TEntity, TProperty> Include<TEntity, TProperty>(
|
||||
IQueryable<TEntity> source, Expression<Func<TEntity, TProperty>> navigationPropertyPath)
|
||||
where TEntity : class;
|
||||
|
||||
Task ExecuteSql(string sql);
|
||||
DbSet<T> _db { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue