public IEnumerable <TEntity> FindWithDeleted(Expression <Func <TEntity, bool> > predicate, Func <IQueryable <TEntity>, IIncludableQueryable <TEntity, object> > include = null) { QueryableDbSet = DbContext.Set <TEntity>().IgnoreQueryFilters(); if (include != null) { QueryableDbSet = include(QueryableDbSet); } return(QueryableDbSet.AsNoTracking().Where(predicate)); }
public Repository(ProchefDbContext context) { DbContext = context; DbSet = DbContext.Set <TEntity>(); QueryableDbSet = DbSet; }