From 35e16bcc61e4a8781c432020bbdafab24b5f74e4 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Sat, 30 Oct 2021 13:26:03 +0800 Subject: [PATCH] Split table --- Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs | 7 +++++++ Src/Asp.Net/SqlSugar/Interface/Insertable.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs b/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs index 8dc73a2b2..225cf8d72 100644 --- a/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs +++ b/Src/Asp.Net/SqlServerTest/Demo/Demo3_Insertable.cs @@ -149,6 +149,13 @@ namespace OrmTest SubNoIdentity(db); SubIdentity(db); + + + var dict = new Dictionary(); + dict.Add("name", "1"); + dict.Add("CreateTime", DateTime.Now); + dict.Add("Price", 1); + db.Insertable(dict).AS("[Order]").ExecuteCommand(); Console.WriteLine("#### Insertable End ####"); } diff --git a/Src/Asp.Net/SqlSugar/Interface/Insertable.cs b/Src/Asp.Net/SqlSugar/Interface/Insertable.cs index 7c1296d0c..e136e14e8 100644 --- a/Src/Asp.Net/SqlSugar/Interface/Insertable.cs +++ b/Src/Asp.Net/SqlSugar/Interface/Insertable.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace SqlSugar { - public partial interface IInsertable + public partial interface IInsertable where T :class,new() { InsertBuilder InsertBuilder { get; set; } int ExecuteCommand();