From c012c166d80b49dbf0751504455f5a82761b4d2e Mon Sep 17 00:00:00 2001 From: d4ilys <963922242@qq.com> Date: Tue, 25 Apr 2023 10:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4CodeFirst=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/Extensions/CodeFirstExtensions.cs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/FreeSql/Extensions/CodeFirstExtensions.cs b/FreeSql/Extensions/CodeFirstExtensions.cs index 6ccf08c5..818be04c 100644 --- a/FreeSql/Extensions/CodeFirstExtensions.cs +++ b/FreeSql/Extensions/CodeFirstExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Text; using FreeSql.DataAnnotations; using FreeSql.Internal; @@ -7,30 +8,19 @@ using FreeSql.Internal; namespace FreeSql.Extensions { #if net40 || NETSTANDARD2_0 - //不支持 #else - public static class CodeFirstExtensions + public static class CodeFirstExtensions { /// /// 动态构建Class Type /// /// - public static DynamicCompileBuilder DynamicEntity(this ICodeFirst codeFirst, string className, TableAttribute tableAttribute) + public static DynamicCompileBuilder DynamicEntity(this ICodeFirst codeFirst, string className, + TableAttribute tableAttribute) { return new DynamicCompileBuilder().SetClass(className, tableAttribute); } - /// - /// 根据动态构建的Class Type生成实例并进行属性赋值 - /// - /// - /// - /// - public static object CreateDynamicEntityInstance(this Type type, - Dictionary porpertys) - { - return DynamicCompileBuilder.CreateObjectByType(type, porpertys); - } } #endif -} +} \ No newline at end of file