Exemplo n.º 1
0
        public virtual int GetCount(SafeDeletableState state, Expression <Func <TEntity, bool> > condition)
        {
            var data = GetQueryable(state);

            return(GetCountInternal(data, condition));
        }
Exemplo n.º 2
0
        public virtual IList <TEntity> GetAll(SafeDeletableState state, Expression <Func <TEntity, bool> > condition, Func <IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
        {
            var data = GetQueryable(state);

            return(GetAllInternal(data, condition, sortFunc, null));
        }
Exemplo n.º 3
0
 public virtual int GetCount(SafeDeletableState state)
 {
     return(GetCount(state, null));
 }
Exemplo n.º 4
0
 public virtual IList <TEntity> GetAll(SafeDeletableState state, Func <IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
 {
     return(GetAll(state, null, sortFunc));
 }
Exemplo n.º 5
0
 public virtual IList <TEntity> GetAll(SafeDeletableState state, Expression <Func <TEntity, bool> > condition)
 {
     return(GetAll(state, condition, null));
 }
Exemplo n.º 6
0
 public virtual IList <TEntity> GetAll(SafeDeletableState state)
 {
     return(GetAll(state, null, null));
 }
Exemplo n.º 7
0
        protected virtual IQueryable <TEntity> FilterByState(IQueryable <TEntity> data, SafeDeletableState state)
        {
            IQueryable <TEntity> result = data;

            switch (state)
            {
            case SafeDeletableState.Deleted:
                result = data.Where(DeletedCondition);
                break;

            case SafeDeletableState.NotDeleted:
                result = data.Where(NotDeletedCondition);
                break;
            }
            return(result);
        }
Exemplo n.º 8
0
 public virtual IQueryable <TEntity> GetQueryable(SafeDeletableState state)
 {
     return(FilterByState(DbSet, state));
 }
Exemplo n.º 9
0
        public virtual IList <TEntity> GetWindow(SafeDeletableState state, Expression <Func <TEntity, bool> > condition, int startFrom, int windowSize, Func <IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
        {
            var data = GetQueryable(state);

            return(GetWindowInternal(data, condition, startFrom, windowSize, sortFunc));
        }
Exemplo n.º 10
0
 public virtual IList <TEntity> GetWindow(SafeDeletableState state, int startFrom, int windowSize, Func <IQueryable <TEntity>, IOrderedQueryable <TEntity> > sortFunc)
 {
     return(GetWindow(state, null, startFrom, windowSize, sortFunc));
 }