Forem Creators and Builders 🌱

Discussion on: Testing on Forem

Collapse
 
ngtrian profile image
Tri Ân

code hightlight

        public virtual IList<TEntity> GetAll(Func<IQueryable<TEntity>, IQueryable<TEntity>> func = null,
            Func<IStaticCacheManager, CacheKey> getCacheKey = null, bool includeDeleted = true)
        {
            IList<TEntity> getAll()
            {
                var query = AddDeletedFilter(Table, includeDeleted);
                query = func != null ? func(query) : query;

                return query.ToList();
            }

            return GetEntities(getAll, getCacheKey);
        }
Enter fullscreen mode Exit fullscreen mode