IDbContext.cs 880 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Y.DB.DAO
  8. {
  9. /// <summary>
  10. /// 数据通信接口
  11. /// </summary>
  12. public interface IDbContext : IDisposable
  13. {
  14. int Add<T>(T EntityObj, bool isSave) where T : class;
  15. int Del<T>(T EntityObj, bool isSave) where T : class;
  16. int Update<T>(T EntityObj, bool isSave) where T : class;
  17. int Save();
  18. T Get<T>(Expression<Func<T, bool>> expression, string[] include) where T : class;
  19. IEnumerable<T> Gets<T>(Expression<Func<T, bool>> expression, string[] include) where T : class;
  20. IEnumerable<T> GetAll<T>(string[] include, bool track) where T : class;
  21. IEnumerable<T> ExecuteSqlCom<T, U>(string sql, U paramObjs) where T : class where U : class;
  22. }
  23. }