mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Synchronization code
This commit is contained in:
parent
a21114d580
commit
e183cc607b
@ -47,6 +47,13 @@ namespace SqlSugar
|
||||
ISqlSugarClient db;
|
||||
List<SugarParameter> pars;
|
||||
string where;
|
||||
var isAutoDelFilter =
|
||||
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoDeleteQueryFilter == true &&
|
||||
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoUpdateQueryFilter == true;
|
||||
if (isAutoDelFilter)
|
||||
{
|
||||
DeleteBuilder.Context.CurrentConnectionConfig.MoreSettings.IsAutoUpdateQueryFilter = false;
|
||||
}
|
||||
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
||||
var updateable = db.Updateable<T>();
|
||||
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
||||
@ -64,6 +71,13 @@ namespace SqlSugar
|
||||
ISqlSugarClient db;
|
||||
List<SugarParameter> pars;
|
||||
string where;
|
||||
var isAutoDelFilter =
|
||||
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoDeleteQueryFilter == true &&
|
||||
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoUpdateQueryFilter == true;
|
||||
if (isAutoDelFilter)
|
||||
{
|
||||
DeleteBuilder.Context.CurrentConnectionConfig.MoreSettings.IsAutoUpdateQueryFilter = false;
|
||||
}
|
||||
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
||||
var updateable = db.Updateable<T>();
|
||||
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
||||
|
@ -223,6 +223,10 @@ namespace SqlSugar
|
||||
if (IsTrakingData())
|
||||
{
|
||||
var trackingData = this.Context.TempItems.FirstOrDefault(it => it.Key.StartsWith("Tracking_" + item.GetHashCode()));
|
||||
if (trackingData.Key == null && trackingData.Value == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var diffColumns = FastCopy.GetDiff(item, (T)trackingData.Value);
|
||||
if (diffColumns.Count > 0)
|
||||
{
|
||||
|
@ -21,6 +21,8 @@ namespace SqlSugar
|
||||
public DateTime? DbMinDate { get; set; } = Convert.ToDateTime("1900-01-01");
|
||||
public bool IsNoReadXmlDescription { get; set; }
|
||||
public bool SqlServerCodeFirstNvarchar { get; set; }
|
||||
public bool SqliteCodeFirstEnableDefaultValue { get; set; }
|
||||
public bool SqliteCodeFirstEnableDescription { get; set; }
|
||||
public bool IsAutoUpdateQueryFilter { get; set; }
|
||||
public bool IsAutoDeleteQueryFilter { get; set; }
|
||||
public bool EnableModelFuncMappingColumn { get; set; }
|
||||
|
@ -485,7 +485,9 @@ namespace SqlSugar
|
||||
EnableModelFuncMappingColumn=it.MoreSettings.EnableModelFuncMappingColumn,
|
||||
EnableOracleIdentity = it.MoreSettings.EnableOracleIdentity,
|
||||
IsWithNoLockSubquery=it.MoreSettings.IsWithNoLockSubquery,
|
||||
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision
|
||||
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision,
|
||||
SqliteCodeFirstEnableDefaultValue=it.MoreSettings.SqliteCodeFirstEnableDefaultValue,
|
||||
SqliteCodeFirstEnableDescription=it.MoreSettings.SqliteCodeFirstEnableDescription
|
||||
|
||||
},
|
||||
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
||||
|
Loading…
Reference in New Issue
Block a user