Example #1
0
        public IQueryable <T> FindBy(Expression <Func <T, bool> > predicate)
        {
            IQueryable <T> query = context.Set <T>().Where(predicate).Where(x => x.DeletedOn == null);

            return(!(query.Count() > 0) ? Enumerable.Empty <T>().AsQueryable() : query);
        }
Example #2
0
        protected GenericRepository(IWareHouseHelperDbContext _context)
        {
            context = _context;

            dbSet = _context.Set <T>();
        }