Example #1
0
        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));
        }
Example #2
0
 public Repository(ProchefDbContext context)
 {
     DbContext      = context;
     DbSet          = DbContext.Set <TEntity>();
     QueryableDbSet = DbSet;
 }