From 91cd05bd8ebf0ba892ef2d7e46f6734a51ef7ea2 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 15 Jun 2023 13:18:03 +0800 Subject: [PATCH] Add demo --- Src/Asp.Net/DmTest/Config.cs | 2 +- Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/DmTest/Config.cs b/Src/Asp.Net/DmTest/Config.cs index 02dcd11f8..1ced6dc9b 100644 --- a/Src/Asp.Net/DmTest/Config.cs +++ b/Src/Asp.Net/DmTest/Config.cs @@ -15,7 +15,7 @@ namespace OrmTest /// Account have permission to create database /// 用有建库权限的数据库账号 /// - public static string ConnectionString = "Server=116.242.92.57:5511;User Id=S;PWD=S0718;DATABASE=DAMENG"; + public static string ConnectionString = "Server=153.101.199.83:5236;User Id=SYSDBA;PWD=QwerasdABC;DATABASE=DAMENG"; /// /// Account have permission to create database /// 用有建库权限的数据库账号 diff --git a/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs index 6a1812ae6..65a9011a6 100644 --- a/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/DmTest/Demo/DemoE_CodeFirst.cs @@ -37,6 +37,8 @@ namespace OrmTest var list = db.Queryable().ToList(); db.CodeFirst.InitTables(); var tableInfo=db.DbMaintenance.GetColumnInfosByTableName("CodeFirstLong", false); + db.CodeFirst.InitTables(); + db.Insertable(new CodeFirstadfafa() { index = "a" }).ExecuteCommand(); db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings() { IsAutoToUpper = false @@ -55,6 +57,10 @@ namespace OrmTest Console.WriteLine("#### CodeFirst end ####"); } } + public class CodeFirstadfafa + { + public string index { get; set; } + } public class CodeFirstNoUpper { [SugarColumn(IsPrimaryKey =true)]