IDbContext.cs 859 B

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