mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
-
This commit is contained in:
@@ -39,46 +39,6 @@ namespace SqlSugar
|
||||
return base._DbBind;
|
||||
}
|
||||
}
|
||||
public virtual IDbFirst DbFirst
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._DbFirst == null)
|
||||
{
|
||||
IDbFirst dbFirst = InstanceFactory.GetDbFirst(this.Context.CurrentConnectionConfig);
|
||||
base._DbFirst = dbFirst;
|
||||
dbFirst.Context = this.Context;
|
||||
}
|
||||
return base._DbFirst;
|
||||
}
|
||||
}
|
||||
public virtual ICodeFirst CodeFirst
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._CodeFirst == null)
|
||||
{
|
||||
ICodeFirst codeFirst = InstanceFactory.GetCodeFirst(this.Context.CurrentConnectionConfig);
|
||||
base._CodeFirst = codeFirst;
|
||||
codeFirst.Context = this.Context;
|
||||
}
|
||||
return base._CodeFirst;
|
||||
}
|
||||
}
|
||||
public virtual IDbMaintenance DbMaintenance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._DbMaintenance == null)
|
||||
{
|
||||
IDbMaintenance maintenance = InstanceFactory.GetDbMaintenance(this.Context.CurrentConnectionConfig);
|
||||
base._DbMaintenance = maintenance;
|
||||
maintenance.Context = this.Context;
|
||||
}
|
||||
return base._DbMaintenance;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int CommandTimeOut { get; set; }
|
||||
public virtual CommandType CommandType { get; set; }
|
||||
public virtual bool IsEnableLogEvent { get; set; }
|
||||
|
@@ -154,7 +154,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -165,7 +165,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -174,7 +174,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,7 +185,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -616,7 +616,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetPrimaries(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -627,7 +627,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (this.Context.IsSystemTablesConfig)
|
||||
{
|
||||
return this.Context.Database.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
return this.Context.DbMaintenance.GetIsIdentities(this.EntityInfo.DbTableName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -28,12 +28,7 @@ namespace SqlSugar
|
||||
Action<string, string> LogEventCompleted { get; set; }
|
||||
bool IsClearParameters { get; set; }
|
||||
int CommandTimeOut { get; set; }
|
||||
|
||||
IDbFirst DbFirst { get;}
|
||||
ICodeFirst CodeFirst { get; }
|
||||
IDbBind DbBind { get; }
|
||||
IDbMaintenance DbMaintenance{ get;}
|
||||
|
||||
void SetCommandToAdapter(IDataAdapter adapter,IDbCommand command);
|
||||
IDataAdapter GetAdapter();
|
||||
IDbCommand GetCommand(string sql, SugarParameter[] pars);
|
||||
|
@@ -23,6 +23,9 @@ namespace SqlSugar
|
||||
protected IDb _Ado;
|
||||
protected ILambdaExpressions _LambdaExpressions;
|
||||
protected IRewritableMethods _RewritableMethods;
|
||||
protected IDbFirst _DbFirst;
|
||||
protected ICodeFirst _CodeFirst;
|
||||
protected IDbMaintenance _DbMaintenance;
|
||||
|
||||
protected void InitConstructor()
|
||||
{
|
||||
|
@@ -321,6 +321,54 @@ namespace SqlSugar
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DbFirst
|
||||
public virtual IDbFirst DbFirst
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._DbFirst == null)
|
||||
{
|
||||
IDbFirst dbFirst = InstanceFactory.GetDbFirst(this.Context.CurrentConnectionConfig);
|
||||
base._DbFirst = dbFirst;
|
||||
dbFirst.Context = this.Context;
|
||||
}
|
||||
return base._DbFirst;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CodeFirst
|
||||
public virtual ICodeFirst CodeFirst
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._CodeFirst == null)
|
||||
{
|
||||
ICodeFirst codeFirst = InstanceFactory.GetCodeFirst(this.Context.CurrentConnectionConfig);
|
||||
base._CodeFirst = codeFirst;
|
||||
codeFirst.Context = this.Context;
|
||||
}
|
||||
return base._CodeFirst;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DbMaintenance
|
||||
public virtual IDbMaintenance DbMaintenance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (base._DbMaintenance == null)
|
||||
{
|
||||
IDbMaintenance maintenance = InstanceFactory.GetDbMaintenance(this.Context.CurrentConnectionConfig);
|
||||
base._DbMaintenance = maintenance;
|
||||
maintenance.Context = this.Context;
|
||||
}
|
||||
return base._DbMaintenance;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Entity Methods
|
||||
public virtual EntityProvider EntityProvider
|
||||
{
|
||||
|
Reference in New Issue
Block a user