From f0bba2dbcbd1dbe61a4c398cfb9d809809cdcde0 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 5 Jun 2023 22:26:51 +0800 Subject: [PATCH] Add demo --- Src/Asp.NetCore2/OracleTest/Demo/DemoE_CodeFirst.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Src/Asp.NetCore2/OracleTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.NetCore2/OracleTest/Demo/DemoE_CodeFirst.cs index 1e9d3c31b..5af7b4a3d 100644 --- a/Src/Asp.NetCore2/OracleTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.NetCore2/OracleTest/Demo/DemoE_CodeFirst.cs @@ -3,6 +3,7 @@ using SqlSugar.DbConvert; using System; using System.Collections.Generic; using System.Linq; +using System.Net.Http.Headers; using System.Text; namespace OrmTest @@ -34,9 +35,15 @@ namespace OrmTest db.Insertable(new CodeFirstTable22x2() { Name = "a" }) .ExecuteCommand(); var list2=db.Queryable().ToList(); + db.CodeFirst.InitTables(); + db.Insertable(new CodeFirstUnitrew() { Index = 1 }).ExecuteCommand(); Console.WriteLine("#### CodeFirst end ####"); } } + public class CodeFirstUnitrew + { + public int Index { get; set; } + } [SugarTable("CodeFirstTable22r2")] public class CodeFirstTable22x2 {