Add db.DeleteableWithAttr

This commit is contained in:
sunkaixuan
2022-06-30 14:22:38 +08:00
parent 251e59c3bf
commit f7842c0994
3 changed files with 9 additions and 1 deletions

View File

@@ -1300,6 +1300,10 @@ namespace SqlSugar
{ {
return this.GetConnectionWithAttr<T>().Deleteable(deleteObject); return this.GetConnectionWithAttr<T>().Deleteable(deleteObject);
} }
public IDeleteable<T> DeleteableWithAttr<T>() where T : class, new()
{
return this.GetConnectionWithAttr<T>().Deleteable<T>();
}
public IDeleteable<T> DeleteableWithAttr<T>(List<T> deleteObjects) where T : class, new() public IDeleteable<T> DeleteableWithAttr<T>(List<T> deleteObjects) where T : class, new()
{ {
return this.GetConnectionWithAttr<T>().Deleteable(deleteObjects); return this.GetConnectionWithAttr<T>().Deleteable(deleteObjects);

View File

@@ -2,7 +2,7 @@
<package > <package >
<metadata> <metadata>
<id>SqlSugarCore</id> <id>SqlSugarCore</id>
<version>5.0.9.1</version> <version>5.0.9.2-preview04</version>
<authors>sunkaixuan</authors> <authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners> <owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>

View File

@@ -725,6 +725,10 @@ namespace SqlSugar
{ {
return ScopedContext.DeleteableWithAttr<T>(deleteObj); return ScopedContext.DeleteableWithAttr<T>(deleteObj);
} }
public IDeleteable<T> DeleteableWithAttr<T>() where T : class, new()
{
return ScopedContext.DeleteableWithAttr<T>();
}
public IDeleteable<T> DeleteableWithAttr<T>(List<T> deleteObjs) where T : class, new() public IDeleteable<T> DeleteableWithAttr<T>(List<T> deleteObjs) where T : class, new()
{ {
return ScopedContext.DeleteableWithAttr<T>(deleteObjs); return ScopedContext.DeleteableWithAttr<T>(deleteObjs);