Browse Source

Update Core

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
a63711ba54
  1. 10
      Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs
  2. 4
      Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs
  3. 4
      Src/Asp.NetCore/SqlServerTest/src/SqlSugar/Properties/AssemblyInfo.cs
  4. 24
      Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs

10
Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs

@ -304,7 +304,15 @@ namespace SqlSugar
protected void AppendNot(object Value) 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");
}
} }
} }
} }

4
Src/Asp.NetCore/SqlServerTest/src/SqlSugar/ExpressionsToSql/ResolveItems/BinaryExpressionResolve.cs

@ -34,8 +34,8 @@ namespace SqlSugar
var lsrb = !leftIsBinary && rightBinary; var lsrb = !leftIsBinary && rightBinary;
var lbrb = rightBinary && leftIsBinary; var lbrb = rightBinary && leftIsBinary;
var lsbs = !leftIsBinary && !rightBinary; var lsbs = !leftIsBinary && !rightBinary;
var isBegin = !base.Context.Result.Contains(ExpressionConst.Format0); var isAppend = !base.Context.Result.Contains(ExpressionConst.Format0);
if (isBegin) if (isAppend)
{ {
base.Context.Result.Append(ExpressionConst.Format3); base.Context.Result.Append(ExpressionConst.Format3);
base.Context.Result.Append(ExpressionConst.Format0); base.Context.Result.Append(ExpressionConst.Format0);

4
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 // 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: Guid("1c022a5c-4e4d-4026-a8a3-f659b9740a1a")]
[assembly: AssemblyVersion("4.1.0.5")] [assembly: AssemblyVersion("4.1.0.7")]
[assembly: AssemblyFileVersion("4.1.0.5")] [assembly: AssemblyFileVersion("4.1.0.7")]

24
Src/Asp.NetCore/SqlServerTest/src/SqlSugar/SqlSugarClient.cs

@ -251,6 +251,30 @@ namespace SqlSugar
DeleteableProvider<T> reval = base.CreateDeleteable<T>(); DeleteableProvider<T> reval = base.CreateDeleteable<T>();
return reval; return reval;
} }
public virtual IDeleteable<T> Deleteable<T>(Expression<Func<T, bool>> expression) where T : class, new()
{
return this.Deleteable<T>().Where(expression);
}
public virtual IDeleteable<T> Deleteable<T>(dynamic primaryKeyValue) where T : class, new()
{
return this.Deleteable<T>().In(primaryKeyValue);
}
public virtual IDeleteable<T> Deleteable<T>(dynamic [] primaryKeyValues) where T : class, new()
{
return this.Deleteable<T>().In(primaryKeyValues);
}
public virtual IDeleteable<T> Deleteable<T>(List<dynamic> pkValue) where T : class, new()
{
return this.Deleteable<T>().In(pkValue);
}
public virtual IDeleteable<T> Deleteable<T>(T deleteObj) where T : class, new()
{
return this.Deleteable<T>().Where(deleteObj);
}
public virtual IDeleteable<T> Deleteable<T>(List<T> deleteObjs) where T : class, new()
{
return this.Deleteable<T>().Where(deleteObjs);
}
#endregion #endregion
#region Updateable #region Updateable

Loading…
Cancel
Save