public IQueryable <TEntity> GetModel(Action <IOrderable <TEntity> > orderBy, Expression <Func <TEntity, bool> > predicate) { var linq = new Orderable <TEntity>(GetModel(predicate)); orderBy(linq); return(linq.Queryable); }
//public TEntity Find(ISpecification<TEntity> specification) //{ // return GetModel(specification).FirstOrDefault(); //} //public IQueryable<TEntity> GetModel(Action<IOrderable<TEntity>> orderBy, ISpecification<TEntity> specification) //{ // var linq = new Orderable<TEntity>(GetModel(specification)); // orderBy(linq); // return linq.Queryable; //} //public IQueryable<TEntity> GetModel(ISpecification<TEntity> specification) //{ // return GetModel().Where(specification.SatisfiedBy()); //} #endregion #region IOrderableRepository<TEntity>成员 public IQueryable <TEntity> GetModel(Action <IOrderable <TEntity> > orderBy) { var linq = new Orderable <TEntity>(GetModel()); orderBy(linq); return(linq.Queryable); }