From 2a9ac296ef8ef4337afad6b6c4731a37d7ed68f6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 3 Jul 2017 02:59:52 +0800 Subject: [PATCH] Simplified Delete --- .../SqlSugar/Properties/AssemblyInfo.cs | 4 ++-- Src/Asp.Net/SqlSugar/SqlSugarClient.cs | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs index 3ef09db3e..cf44469f3 100644 --- a/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs +++ b/Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.1.0.5")] -[assembly: AssemblyFileVersion("4.1.0.5")] +[assembly: AssemblyVersion("4.1.0.6")] +[assembly: AssemblyFileVersion("4.1.0.6")] diff --git a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs b/Src/Asp.Net/SqlSugar/SqlSugarClient.cs index 7aff8a584..5581f3f6d 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.Net/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