爱思开
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

2 years ago
  1. using NFine.Code;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data.Common;
  5. using System.Linq;
  6. using System.Linq.Expressions;
  7. namespace NFine.Data
  8. {
  9. /// <summary>
  10. /// 仓储接口
  11. /// </summary>
  12. /// <typeparam name="TEntity">实体类型</typeparam>
  13. public interface IRepositoryBase<TEntity> where TEntity : class,new()
  14. {
  15. int Insert(TEntity entity);
  16. int Insert(List<TEntity> entitys);
  17. int Update(TEntity entity);
  18. int Delete(TEntity entity);
  19. int Delete(Expression<Func<TEntity, bool>> predicate);
  20. TEntity FindEntity(object keyValue);
  21. TEntity FindEntity(Expression<Func<TEntity, bool>> predicate);
  22. IQueryable<TEntity> IQueryable();
  23. IQueryable<TEntity> IQueryable(Expression<Func<TEntity, bool>> predicate);
  24. List<TEntity> FindList(string strSql);
  25. List<TEntity> FindList(string strSql, DbParameter[] dbParameter);
  26. List<TEntity> FindList(Pagination pagination);
  27. List<TEntity> FindList(Expression<Func<TEntity, bool>> predicate, Pagination pagination);
  28. }
  29. }