临时提交
This commit is contained in:
18
DMS.Core/Interfaces/IDbContext.cs
Normal file
18
DMS.Core/Interfaces/IDbContext.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DMS.Core.Interfaces
|
||||
{
|
||||
public interface IDbContext
|
||||
{
|
||||
// Define common database operations here, e.g.,
|
||||
// Task<TEntity> GetByIdAsync<TEntity>(int id) where TEntity : class;
|
||||
// Task AddAsync<TEntity>(TEntity entity) where TEntity : class;
|
||||
// Task UpdateAsync<TEntity>(TEntity entity) where TEntity : class;
|
||||
// Task DeleteAsync<TEntity>(TEntity entity) where TEntity : class;
|
||||
// SqlSugarClient GetClient(); // This should NOT be here if you want to hide SqlSugar
|
||||
|
||||
// For now, we'll just keep it empty or add methods as needed.
|
||||
// The primary goal is to abstract away SqlSugarClient.
|
||||
// The IUnitOfWork already handles transactions.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user