|
- using System.Data;
- using System.Data.Common;
- using System.Linq.Expressions;
-
- namespace HealthMonitor.Core.Dal
- {
-
-
-
- public interface IDataAccessor : IWithDataSchema, IDisposable
- {
-
-
-
-
- bool IsClose();
-
-
-
-
- void Close();
-
-
-
-
-
-
- T? GetFirstOrDefault<T>(Expression<Func<T, bool>> expression) where T : class;
-
- Task<T> GetFirstOrDefaultAsync<T>(Expression<Func<T, bool>> expression) where T : class;
-
-
-
-
-
-
-
- T GetByID<T>(params object[] values) where T : class;
-
-
-
-
-
-
-
- Task<T> GetByIDAsync<T>(params object[] values) where T : class;
-
-
-
-
-
-
- IQueryable<T> GetAll<T>() where T : class;
-
-
-
-
-
-
-
- IQueryable<T> GetMany<T>(Expression<Func<T, bool>> expression) where T : class;
-
-
-
-
-
-
-
-
-
- IEnumerable<T> Order<T, TKey>(Func<T, TKey> orderExpression, bool isASC = false) where T : class;
-
-
-
-
-
-
-
-
-
-
-
- List<T> GetPageList<T, Tkey>(int pageSize, int pageIdx, Expression<Func<T, bool>> expression, Func<T, Tkey> orderExpression) where T : class;
-
-
-
-
-
-
-
-
-
-
-
- Task<List<T>> GetPageListAsync<T, Tkey>(int pageSize, int pageIdx, Expression<Func<T, bool>> expression, Func<T, Tkey> orderExpression) where T : class;
-
-
-
-
-
-
-
- int GetCount<T>(Expression<Func<T, bool>> expression) where T : class;
-
-
-
-
-
-
-
- Task<int> GetCountAsync<T>(Expression<Func<T, bool>> expression) where T : class;
-
-
-
-
-
-
-
- T AddWithIdentity<T>(T model) where T : class;
-
-
-
-
-
-
-
- Task<T> AddWithIdentityAsync<T>(T model) where T : class;
-
-
-
-
-
-
-
- void Add<T>(T model) where T : class;
-
-
-
-
-
-
- void Add(object model);
-
-
-
-
-
- void AddRange(IEnumerable<object> models);
-
-
-
-
-
-
-
- void Delete<T>(T model) where T : class;
-
-
-
-
-
-
- void Delete(object model);
-
-
-
-
-
- void DeleteRanage(IEnumerable<object> models);
-
-
-
-
-
-
-
- void Update<T>(T model) where T : class;
-
-
-
-
-
-
-
-
- void Update<T>(T model, Expression<Func<T, object>> property) where T : class;
-
-
-
-
-
-
- void Update(object model);
-
-
-
-
-
- void UpdateRanage(IEnumerable<object> models);
-
-
-
-
-
-
-
- List<DataTable> CallProcedure(string procName, params DbParameter[] parameters);
-
-
-
-
-
-
-
- Task<List<DataTable>?> CallProcedureAsync(string procName, params DbParameter[] parameters);
-
-
-
-
-
- int Save();
-
-
-
-
-
- Task<int> SaveAsync();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- void UntrackEntities(IEnumerable<object> models);
-
-
-
-
-
- void UntrackEntities(object model);
- }
- }
|