mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 20:57:58 +08:00
-
This commit is contained in:
parent
20082cf581
commit
8ef48aa922
@ -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)
|
||||
{
|
||||
if (currentConnectionConfig.DbType == DbType.SqlServer)
|
||||
|
@ -166,7 +166,7 @@ namespace SqlSugar
|
||||
}
|
||||
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); ;
|
||||
reval.Context = this.Context;
|
||||
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||
@ -181,7 +181,7 @@ namespace SqlSugar
|
||||
}
|
||||
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); ;
|
||||
reval.Context = this.Context;
|
||||
reval.SqlBuilder = sqlBuilder;
|
||||
@ -193,7 +193,7 @@ namespace SqlSugar
|
||||
}
|
||||
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); ;
|
||||
reval.Context = this.Context;
|
||||
reval.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||
|
Loading…
Reference in New Issue
Block a user