Skip to content

Commit c012c16

Browse files
committed
调整CodeFirst扩展方法
1 parent 39feb64 commit c012c16

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Reflection;
34
using System.Text;
45
using FreeSql.DataAnnotations;
56
using FreeSql.Internal;
67

78
namespace FreeSql.Extensions
89
{
910
#if net40 || NETSTANDARD2_0
10-
//不支持
1111
#else
12-
public static class CodeFirstExtensions
12+
public static class CodeFirstExtensions
1313
{
1414
/// <summary>
1515
/// 动态构建Class Type
1616
/// </summary>
1717
/// <returns></returns>
18-
public static DynamicCompileBuilder DynamicEntity(this ICodeFirst codeFirst, string className, TableAttribute tableAttribute)
18+
public static DynamicCompileBuilder DynamicEntity(this ICodeFirst codeFirst, string className,
19+
TableAttribute tableAttribute)
1920
{
2021
return new DynamicCompileBuilder().SetClass(className, tableAttribute);
2122
}
2223

23-
/// <summary>
24-
/// 根据动态构建的Class Type生成实例并进行属性赋值
25-
/// </summary>
26-
/// <param name="type"></param>
27-
/// <param name="porpertys"></param>
28-
/// <returns></returns>
29-
public static object CreateDynamicEntityInstance(this Type type,
30-
Dictionary<string, object> porpertys)
31-
{
32-
return DynamicCompileBuilder.CreateObjectByType(type, porpertys);
33-
}
3424
}
3525
#endif
36-
}
26+
}

0 commit comments

Comments
 (0)