From 91ecf1e6a61ca0d44990f0dc05ac5770866aa147 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Tue, 1 Feb 2022 13:29:51 +0800 Subject: [PATCH] Update demo --- Src/Asp.Net/MySqlConnectorTest/Config.cs | 2 +- .../Demo/Demo3_Insertable.cs | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Src/Asp.Net/MySqlConnectorTest/Config.cs b/Src/Asp.Net/MySqlConnectorTest/Config.cs index f2f301882..6c8f50d64 100644 --- a/Src/Asp.Net/MySqlConnectorTest/Config.cs +++ b/Src/Asp.Net/MySqlConnectorTest/Config.cs @@ -16,7 +16,7 @@ namespace OrmTest /// Account have permission to create database /// 用有建库权限的数据库账号 /// - public static string ConnectionString = "server=localhost;Database=SqlSugar4xTest;Uid=root;Pwd=haosql"; + public static string ConnectionString = "server=localhost;Database=SqlSugar4xTest;Uid=root;Pwd=haosql;AllowLoadLocalInfile=true"; /// /// Account have permission to create database /// 用有建库权限的数据库账号 diff --git a/Src/Asp.Net/MySqlConnectorTest/Demo/Demo3_Insertable.cs b/Src/Asp.Net/MySqlConnectorTest/Demo/Demo3_Insertable.cs index 21bc5f998..e06cc7d32 100644 --- a/Src/Asp.Net/MySqlConnectorTest/Demo/Demo3_Insertable.cs +++ b/Src/Asp.Net/MySqlConnectorTest/Demo/Demo3_Insertable.cs @@ -51,21 +51,21 @@ namespace OrmTest db.Insertable(insertObj).With(SqlWith.UpdLock).ExecuteCommand(); db.Deleteable().ExecuteCommand(); - db.Insertable(new Order() - { - CreateTime = DateTime.Now, - CustomId = 11, - Name = "11", - Price = 11 - }).UseMySql().ExecuteBulkCopy(); - db.Insertable(new OrderItem() - { - CreateTime = DateTime.Now, - ItemId = 1, - OrderId = 1, - OrderName = "a", - Price = 11 - }).UseMySql().ExecuteBulkCopy(); + //db.Insertable(new Order() + //{ + // CreateTime = DateTime.Now, + // CustomId = 11, + // Name = "11", + // Price = 11 + //}).UseMySql().ExecuteBulkCopy(); + //db.Insertable(new OrderItem() + //{ + // CreateTime = DateTime.Now, + // ItemId = 1, + // OrderId = 1, + // OrderName = "a", + // Price = 11 + //}).UseMySql().ExecuteBulkCopy(); var data = db.Queryable().ToList(); db.Insertable(data).UseMySql().ExecuteBulkCopy(); db.Fastest().BulkUpdate(data);