From c53e012675b3b53d70d1633b42e3d5c772e6772a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 16 Dec 2022 20:25:40 +0800 Subject: [PATCH] Synchronization code --- Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastBuilder.cs | 1 + Src/Asp.Net/SqlSugar/Abstract/FastestProvider/Private.cs | 5 ++++- Src/Asp.Net/SqlSugar/Interface/IFastBuilder.cs | 1 + Src/Asp.Net/SqlSugar/OnlyNet/OracleFastBuilder.cs | 1 + .../Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastBuilder.cs b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastBuilder.cs index ea3157e5c..cb9a937c7 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastBuilder.cs @@ -9,6 +9,7 @@ namespace SqlSugar { public class FastBuilder { + public EntityInfo FastEntityInfo { get; set; } public virtual bool IsActionUpdateColumns { get; set; } public virtual DbFastestProperties DbFastestProperties { get; set; } public SqlSugarProvider Context { get; set; } diff --git a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/Private.cs b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/Private.cs index cd17ac89c..4d98df1ce 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/Private.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/Private.cs @@ -42,7 +42,10 @@ namespace SqlSugar default: break; } - throw new Exception(this.context.CurrentConnectionConfig.DbType + "开发中..."); + var reslut = InstanceFactory.CreateInstance($"SqlSugar.{this.context.CurrentConnectionConfig.DbType}FastBuilder"); + reslut.CharacterSet = this.CharacterSet; + reslut.FastEntityInfo = this.entityInfo; + return reslut; } private DataTable ToDdateTable(List datas) { diff --git a/Src/Asp.Net/SqlSugar/Interface/IFastBuilder.cs b/Src/Asp.Net/SqlSugar/Interface/IFastBuilder.cs index 8a5db2035..1b6c7c71a 100644 --- a/Src/Asp.Net/SqlSugar/Interface/IFastBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Interface/IFastBuilder.cs @@ -9,6 +9,7 @@ namespace SqlSugar { public interface IFastBuilder { + EntityInfo FastEntityInfo { get; set; } bool IsActionUpdateColumns { get; set; } DbFastestProperties DbFastestProperties { get; set; } SqlSugarProvider Context { get; set; } diff --git a/Src/Asp.Net/SqlSugar/OnlyNet/OracleFastBuilder.cs b/Src/Asp.Net/SqlSugar/OnlyNet/OracleFastBuilder.cs index 61b40cd52..03df02161 100644 --- a/Src/Asp.Net/SqlSugar/OnlyNet/OracleFastBuilder.cs +++ b/Src/Asp.Net/SqlSugar/OnlyNet/OracleFastBuilder.cs @@ -9,6 +9,7 @@ namespace SqlSugar { public class OracleFastBuilder:IFastBuilder { + public EntityInfo FastEntityInfo { get; set; } public string CharacterSet { get; set; } public OracleFastBuilder(EntityInfo entityInfo) { diff --git a/Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs index b3997556e..ff8752ac4 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteFastBuilder.cs @@ -10,6 +10,7 @@ namespace SqlSugar { public class SqliteFastBuilder : IFastBuilder { + public EntityInfo FastEntityInfo { get; set; } private EntityInfo entityInfo; private bool IsUpdate = false; public string CharacterSet { get; set; }