纽威
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.

28 lines
1.4 KiB

3 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. public interface IRepositoryBase : IDisposable
  10. {
  11. IRepositoryBase BeginTrans();
  12. int Commit();
  13. int Insert<TEntity>(TEntity entity) where TEntity : class;
  14. int Insert<TEntity>(List<TEntity> entitys) where TEntity : class;
  15. int Update<TEntity>(TEntity entity) where TEntity : class;
  16. int Delete<TEntity>(TEntity entity) where TEntity : class;
  17. int Delete<TEntity>(Expression<Func<TEntity, bool>> predicate) where TEntity : class;
  18. TEntity FindEntity<TEntity>(object keyValue) where TEntity : class;
  19. TEntity FindEntity<TEntity>(Expression<Func<TEntity, bool>> predicate) where TEntity : class;
  20. IQueryable<TEntity> IQueryable<TEntity>() where TEntity : class;
  21. IQueryable<TEntity> IQueryable<TEntity>(Expression<Func<TEntity, bool>> predicate) where TEntity : class;
  22. List<TEntity> FindList<TEntity>(string strSql) where TEntity : class;
  23. List<TEntity> FindList<TEntity>(string strSql, DbParameter[] dbParameter) where TEntity : class;
  24. List<TEntity> FindList<TEntity>(Pagination pagination) where TEntity : class,new();
  25. List<TEntity> FindList<TEntity>(Expression<Func<TEntity, bool>> predicate, Pagination pagination) where TEntity : class,new();
  26. }
  27. }