private T Get <T>(DbCtx db, Expression <Func <T, bool> > where, params Expression <Func <T, object> >[] navigationProperties) where T : class { IQueryable <T> query = db.GetQuery <T>(where, navigationProperties); return(query.FirstOrDefault()); }
private IList <T> GetList <T>(DbCtx db, Expression <Func <T, bool> > where, params Expression <Func <T, object> >[] navigationProperties) where T : class { IQueryable <T> query = db.GetQuery <T>(where, navigationProperties); return(query.ToList <T>()); }
private IList <T> GetPaginated <T>(DbCtx db, int page, int limit, Expression <Func <T, bool> > where, params Expression <Func <T, object> >[] navigationProperties) where T : class { IQueryable <T> query = db.GetQuery <T>(where, navigationProperties); return(query.Skip(page * limit).Take(limit).ToList <T>()); }