Update Core

This commit is contained in:
sunkaixuan
2017-07-03 13:09:45 +08:00
parent a21d9dfa53
commit a63711ba54
4 changed files with 37 additions and 5 deletions

View File

@@ -303,8 +303,16 @@ namespace SqlSugar
} }
protected void AppendNot(object Value) protected void AppendNot(object Value)
{
var isAppend = !this.Context.Result.Contains(ExpressionConst.Format0);
if (isAppend)
{ {
this.Context.Result.Append("NOT"); this.Context.Result.Append("NOT");
} }
else
{
this.Context.Result.Replace(ExpressionConst.Format0, "NOT");
}
}
} }
} }

View File

@@ -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);

View File

@@ -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")]

View File

@@ -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