diff --git a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs index 04b445804..b87af83f5 100644 --- a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs +++ b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs @@ -304,7 +304,15 @@ namespace SqlSugar protected void AppendNot(object Value) { - this.Context.Result.Append("NOT"); + var isAppend = !this.Context.Result.Contains(ExpressionConst.Format0); + if (isAppend) + { + this.Context.Result.Append("NOT"); + } + else + { + this.Context.Result.Replace(ExpressionConst.Format0, "NOT"); + } } } } diff --git a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs index 6a2498a7d..4c1fcacf5 100644 --- a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs +++ b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs @@ -34,8 +34,8 @@ namespace SqlSugar var lsrb = !leftIsBinary && rightBinary; var lbrb = rightBinary && leftIsBinary; var lsbs = !leftIsBinary && !rightBinary; - var isBegin = !base.Context.Result.Contains(ExpressionConst.Format0); - if (isBegin) + var isAppend = !base.Context.Result.Contains(ExpressionConst.Format0); + if (isAppend) { base.Context.Result.Append(ExpressionConst.Format3); base.Context.Result.Append(ExpressionConst.Format0); diff --git a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/Properties/AssemblyInfo.cs b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/Properties/AssemblyInfo.cs index b505724d7..2062012c6 100644 --- a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/Properties/AssemblyInfo.cs +++ b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/Properties/AssemblyInfo.cs @@ -17,5 +17,5 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1c022a5c-4e4d-4026-a8a3-f659b9740a1a")] -[assembly: AssemblyVersion("4.1.0.5")] -[assembly: AssemblyFileVersion("4.1.0.5")] +[assembly: AssemblyVersion("4.1.0.7")] +[assembly: AssemblyFileVersion("4.1.0.7")] diff --git a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs index 7aff8a584..5581f3f6d 100644 --- a/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs @@ -251,6 +251,30 @@ namespace SqlSugar DeleteableProvider reval = base.CreateDeleteable(); return reval; } + public virtual IDeleteable Deleteable(Expression> expression) where T : class, new() + { + return this.Deleteable().Where(expression); + } + public virtual IDeleteable Deleteable(dynamic primaryKeyValue) where T : class, new() + { + return this.Deleteable().In(primaryKeyValue); + } + public virtual IDeleteable Deleteable(dynamic [] primaryKeyValues) where T : class, new() + { + return this.Deleteable().In(primaryKeyValues); + } + public virtual IDeleteable Deleteable(List pkValue) where T : class, new() + { + return this.Deleteable().In(pkValue); + } + public virtual IDeleteable Deleteable(T deleteObj) where T : class, new() + { + return this.Deleteable().Where(deleteObj); + } + public virtual IDeleteable Deleteable(List deleteObjs) where T : class, new() + { + return this.Deleteable().Where(deleteObjs); + } #endregion #region Updateable