mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
-
This commit is contained in:
@@ -177,6 +177,41 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static UpdateableProvider<T> GetUpdateableProvider<T>(ConnectionConfig currentConnectionConfig) where T : class, new()
|
||||||
|
{
|
||||||
|
if (currentConnectionConfig.DbType == DbType.Oracle)
|
||||||
|
{
|
||||||
|
return new OracleUpdateable<T>();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return new UpdateableProvider<T>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DeleteableProvider<T> GetDeleteableProvider<T>(ConnectionConfig currentConnectionConfig) where T : class, new()
|
||||||
|
{
|
||||||
|
if (currentConnectionConfig.DbType == DbType.Oracle)
|
||||||
|
{
|
||||||
|
return new OracleDeleteable<T>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new DeleteableProvider<T>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static InsertableProvider<T> GetInsertableProvider<T>(ConnectionConfig currentConnectionConfig) where T : class, new()
|
||||||
|
{
|
||||||
|
if (currentConnectionConfig.DbType == DbType.Oracle)
|
||||||
|
{
|
||||||
|
return new OracleInsertable<T>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new InsertableProvider<T>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static IDbBind GetDbBind(ConnectionConfig currentConnectionConfig)
|
public static IDbBind GetDbBind(ConnectionConfig currentConnectionConfig)
|
||||||
{
|
{
|
||||||
if (currentConnectionConfig.DbType == DbType.SqlServer)
|
if (currentConnectionConfig.DbType == DbType.SqlServer)
|
||||||
|
@@ -166,7 +166,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
protected InsertableProvider<T> CreateInsertable<T>(T[] insertObjs) where T : class, new()
|
protected InsertableProvider<T> CreateInsertable<T>(T[] insertObjs) where T : class, new()
|
||||||
{
|
{
|
||||||
var reval = new InsertableProvider<T>();
|
var reval = InstanceFactory.GetInsertableProvider<T>(this.CurrentConnectionConfig);
|
||||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
||||||
reval.Context = this.Context;
|
reval.Context = this.Context;
|
||||||
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||||
@@ -181,7 +181,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
protected DeleteableProvider<T> CreateDeleteable<T>() where T : class, new()
|
protected DeleteableProvider<T> CreateDeleteable<T>() where T : class, new()
|
||||||
{
|
{
|
||||||
var reval = new DeleteableProvider<T>();
|
var reval = InstanceFactory.GetDeleteableProvider<T>(this.CurrentConnectionConfig);
|
||||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
||||||
reval.Context = this.Context;
|
reval.Context = this.Context;
|
||||||
reval.SqlBuilder = sqlBuilder;
|
reval.SqlBuilder = sqlBuilder;
|
||||||
@@ -193,7 +193,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
protected UpdateableProvider<T> CreateUpdateable<T>(T[] UpdateObjs) where T : class, new()
|
protected UpdateableProvider<T> CreateUpdateable<T>(T[] UpdateObjs) where T : class, new()
|
||||||
{
|
{
|
||||||
var reval = new UpdateableProvider<T>();
|
var reval = InstanceFactory.GetUpdateableProvider<T>(this.CurrentConnectionConfig);
|
||||||
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
var sqlBuilder = InstanceFactory.GetSqlbuilder(this.CurrentConnectionConfig); ;
|
||||||
reval.Context = this.Context;
|
reval.Context = this.Context;
|
||||||
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||||
|
Reference in New Issue
Block a user