mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-23 13:21:59 +08:00
Support IList
This commit is contained in:
@@ -174,6 +174,10 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public IInsertable<T> Insertable<T>(dynamic insertDynamicObject) where T : class, new()
|
public IInsertable<T> Insertable<T>(dynamic insertDynamicObject) where T : class, new()
|
||||||
{
|
{
|
||||||
|
if (insertDynamicObject is IList<T>)
|
||||||
|
{
|
||||||
|
return this.Context.Insertable<T>((insertDynamicObject as IList<T>).ToList());
|
||||||
|
}
|
||||||
return this.Context.Insertable<T>(insertDynamicObject);
|
return this.Context.Insertable<T>(insertDynamicObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,6 +727,10 @@ namespace SqlSugar
|
|||||||
|
|
||||||
public IUpdateable<T> Updateable<T>(dynamic updateDynamicObject) where T : class, new()
|
public IUpdateable<T> Updateable<T>(dynamic updateDynamicObject) where T : class, new()
|
||||||
{
|
{
|
||||||
|
if (updateDynamicObject is IList<T>)
|
||||||
|
{
|
||||||
|
return this.Context.Updateable<T>((updateDynamicObject as IList<T>).ToList());
|
||||||
|
}
|
||||||
return this.Context.Updateable<T>(updateDynamicObject);
|
return this.Context.Updateable<T>(updateDynamicObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user