mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-28 21:53:17 +08:00
28 lines
603 B
C#
Executable File
28 lines
603 B
C#
Executable File
using SqlSugar;
|
|
|
|
namespace VOL.Core.DbContext
|
|
{
|
|
public abstract class BaseDbContext : DbContext
|
|
{
|
|
|
|
public virtual ISqlSugarClient SqlSugarClient { get; set; }
|
|
|
|
public bool QueryTracking
|
|
{
|
|
set { }
|
|
}
|
|
public BaseDbContext() : base() { }
|
|
|
|
public virtual ISugarQueryable<TEntity> Set<TEntity>(bool filterDeleted = false) where TEntity : class, new()
|
|
{
|
|
return SqlSugarClient.Queryable<TEntity>();
|
|
}
|
|
|
|
public int SaveChanges()
|
|
{
|
|
return SqlSugarClient.SaveQueues();
|
|
}
|
|
|
|
}
|
|
}
|