- public class QuerySet<T> : IAggregation<T>
- {
- #region 方法
- public T Get()
- {
- throw new NotImplementedException();
- }
- public List<T> ToList()
- {
- throw new NotImplementedException();
- }
- public PageList<T> PageList(int pageIndex, int pageSize)
- {
- throw new NotImplementedException();
- }
- public List<T> UpdateSelect(Expression<Func<T, T>> @where)
- {
- throw new NotImplementedException();
- }
- public IQuery<TResult> Select<TResult>(Expression<Func<T, TResult>> selector)
- {
- throw new NotImplementedException();
- }
- public IOption<T> Top(int num)
- {
- throw new NotImplementedException();
- }
- public IOrder<T> OrderBy<TProperty>(Expression<Func<T, TProperty>> field)
- {
- throw new NotImplementedException();
- }
- public IOrder<T> OrderByDescing<TProperty>(Expression<Func<T, TProperty>> field)
- {
- throw new NotImplementedException();
- }
- public int Count()
- {
- throw new NotImplementedException();
- }
- public bool Exists()
- {
- throw new NotImplementedException();
- }
- public QuerySet<T> Where(Expression<Func<T, bool>> predicate)
- {
- throw new NotImplementedException();
- }
- #endregion
- }
- public interface IAggregation<T> : IOrder<T>
- {
- int Count();
- bool Exists();
- }
- public interface IOrder<T> : IOption<T>
- {
- IOrder<T> OrderBy<TProperty>(Expression<Func<T, TProperty>> field);
- IOrder<T> OrderByDescing<TProperty>(Expression<Func<T, TProperty>> field);
- }
- public interface IOption<T> : IQuery<T>, IUpdateSelect<T>
- {
- IQuery<TResult> Select<TResult>(Expression<Func<T, TResult>> selector);
- IOption<T> Top(int num);
- }
- public interface IUpdateSelect<T>
- {
- List<T> UpdateSelect(Expression<Func<T, T>> where);
- }
- public interface IQuery<T>
- {
- T Get();
- List<T> ToList();
- PageList<T> PageList(int pageIndex, int pageSize);
- }
来源: https://www.cnblogs.com/skychen1218/p/9234177.html