Add db.UpdateableWithAttr(+0)

This commit is contained in:
sunkaixuan
2022-06-27 23:28:28 +08:00
parent 4223005364
commit 6e72226074
3 changed files with 11 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ namespace SqlSugar
IInsertable<T> InsertableWithAttr<T>(T insertObj) where T : class, new();
IInsertable<T> InsertableWithAttr<T>(List<T> insertObjs) where T : class, new();
IUpdateable<T> UpdateableWithAttr<T>(T updateObj) where T : class, new();
IUpdateable<T> UpdateableWithAttr<T>() where T : class, new();
IUpdateable<T> UpdateableWithAttr<T>(List<T> updateObjs) where T : class, new();
IDeleteable<T> DeleteableWithAttr<T>(T deleteObjs) where T : class, new();
IDeleteable<T> DeleteableWithAttr<T>(List<T> deleteObjs) where T : class, new();

View File

@@ -1288,6 +1288,10 @@ namespace SqlSugar
{
return this.GetConnectionWithAttr<T>().Updateable(updateObj);
}
public IUpdateable<T> UpdateableWithAttr<T>() where T : class, new()
{
return this.GetConnectionWithAttr<T>().Updateable<T>();
}
public IUpdateable<T> UpdateableWithAttr<T>(List<T> updateObjs) where T : class, new()
{
return this.GetConnectionWithAttr<T>().Updateable(updateObjs);

View File

@@ -711,6 +711,12 @@ namespace SqlSugar
{
return ScopedContext.UpdateableWithAttr<T>(updateObj);
}
public IUpdateable<T> UpdateableWithAttr<T>() where T : class, new()
{
return ScopedContext.UpdateableWithAttr<T>();
}
public IUpdateable<T> UpdateableWithAttr<T>(List<T> updateObjs) where T : class, new()
{
return ScopedContext.UpdateableWithAttr<T>(updateObjs);