mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add db.InsertByObject
This commit is contained in:
parent
cab01ce26a
commit
65f07efe44
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class InsertMethodInfo
|
||||
{
|
||||
}
|
||||
}
|
@ -675,6 +675,11 @@ namespace SqlSugar
|
||||
#endregion
|
||||
|
||||
#region Insertable
|
||||
public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject)
|
||||
{
|
||||
InsertMethodInfo result = new InsertMethodInfo();
|
||||
return result;
|
||||
}
|
||||
public virtual IInsertable<T> Insertable<T>(T[] insertObjs) where T : class, new()
|
||||
{
|
||||
UtilMethods.CheckArray(insertObjs);
|
||||
|
@ -215,7 +215,10 @@ namespace SqlSugar
|
||||
{
|
||||
ScopedContext.InitMappingInfo<T>();
|
||||
}
|
||||
|
||||
public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject)
|
||||
{
|
||||
return ScopedContext.InsertableByObject(singleEntityObjectOrListObject);
|
||||
}
|
||||
public IInsertable<T> Insertable<T>(Dictionary<string, object> columnDictionary) where T : class, new()
|
||||
{
|
||||
return ScopedContext.Insertable<T>(columnDictionary);
|
||||
|
@ -70,6 +70,7 @@ namespace SqlSugar
|
||||
IInsertable<T> Insertable<T>(List<T> insertObjs) where T : class, new();
|
||||
IInsertable<T> Insertable<T>(T insertObj) where T : class, new();
|
||||
IInsertable<T> Insertable<T>(T[] insertObjs) where T : class, new();
|
||||
InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject);
|
||||
#endregion
|
||||
|
||||
#region Queryable
|
||||
|
@ -159,6 +159,10 @@ namespace SqlSugar
|
||||
#endregion
|
||||
|
||||
#region Insertable
|
||||
public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject)
|
||||
{
|
||||
return this.Context.InsertableByObject(singleEntityObjectOrListObject);
|
||||
}
|
||||
public IInsertable<T> Insertable<T>(Dictionary<string, object> columnDictionary) where T : class, new()
|
||||
{
|
||||
return this.Context.Insertable<T>(columnDictionary);
|
||||
|
@ -232,7 +232,10 @@ namespace SqlSugar
|
||||
{
|
||||
return ScopedContext.Insertable(insertObjs);
|
||||
}
|
||||
|
||||
public InsertMethodInfo InsertableByObject(object singleEntityObjectOrListObject)
|
||||
{
|
||||
return ScopedContext.InsertableByObject(singleEntityObjectOrListObject);
|
||||
}
|
||||
public void Open()
|
||||
{
|
||||
ScopedContext.Open();
|
||||
|
Loading…
Reference in New Issue
Block a user