diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs new file mode 100644 index 000000000..1d2bd6ddf --- /dev/null +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SqlSugar +{ + public class InsertMethodInfo + { + } +} diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs index ecaad96b4..54c1eec6d 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs @@ -675,6 +675,11 @@ namespace SqlSugar #endregion #region Insertable + public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject) + { + InsertMethodInfo result = new InsertMethodInfo(); + return result; + } public virtual IInsertable Insertable(T[] insertObjs) where T : class, new() { UtilMethods.CheckArray(insertObjs); diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs index 1a44f9e46..08af0e1ca 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/SugarProvider/SqlSugarScopeProvider.cs @@ -215,7 +215,10 @@ namespace SqlSugar { ScopedContext.InitMappingInfo(); } - + public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject) + { + return ScopedContext.InsertableByObject(singleEntityObjectOrListObject); + } public IInsertable Insertable(Dictionary columnDictionary) where T : class, new() { return ScopedContext.Insertable(columnDictionary); diff --git a/Src/Asp.NetCore2/SqlSugar/Interface/ISqlSugarClient.cs b/Src/Asp.NetCore2/SqlSugar/Interface/ISqlSugarClient.cs index f81908311..757789d23 100644 --- a/Src/Asp.NetCore2/SqlSugar/Interface/ISqlSugarClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/Interface/ISqlSugarClient.cs @@ -70,6 +70,7 @@ namespace SqlSugar IInsertable Insertable(List insertObjs) where T : class, new(); IInsertable Insertable(T insertObj) where T : class, new(); IInsertable Insertable(T[] insertObjs) where T : class, new(); + InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject); #endregion #region Queryable diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs index d03dd72fa..78be4ce86 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs @@ -159,6 +159,10 @@ namespace SqlSugar #endregion #region Insertable + public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject) + { + return this.Context.InsertableByObject(singleEntityObjectOrListObject); + } public IInsertable Insertable(Dictionary columnDictionary) where T : class, new() { return this.Context.Insertable(columnDictionary); diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs b/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs index 28346009d..7d397bc19 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarScope.cs @@ -232,7 +232,10 @@ namespace SqlSugar { return ScopedContext.Insertable(insertObjs); } - + public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject) + { + return ScopedContext.InsertableByObject(singleEntityObjectOrListObject); + } public void Open() { ScopedContext.Open();