Added in the external repo so we can rip out external stuff

This commit is contained in:
TidusJar 2018-10-04 14:48:21 +01:00
parent 69b573a393
commit 479ca819d7
7 changed files with 241 additions and 96 deletions

View 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; }
}
}