mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Synchronization code
This commit is contained in:
@@ -24,7 +24,16 @@ namespace SqlSugar
|
||||
|
||||
foreach (PropertyMetadata property in properties)
|
||||
{
|
||||
EmitTool.CreateProperty(typeBuilder, property.Name, property.Type, property.CustomAttributes);
|
||||
var type = property.Type;
|
||||
if (type == typeof(DynamicOneselfType))
|
||||
{
|
||||
type = typeBuilder;
|
||||
}
|
||||
else if (type == typeof(DynamicOneselfTypeList))
|
||||
{
|
||||
type = typeof(List<>).MakeGenericType(typeBuilder);
|
||||
}
|
||||
EmitTool.CreateProperty(typeBuilder, property.Name, type, property.CustomAttributes);
|
||||
}
|
||||
|
||||
Type dynamicType = typeBuilder.CreateTypeInfo().AsType();
|
||||
|
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
/// <summary>
|
||||
/// Dynamically construct Type, the property is self, with this type
|
||||
/// </summary>
|
||||
public class DynamicOneselfType
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Dynamically construct Type, the property is List self , with this type
|
||||
/// </summary>
|
||||
public class DynamicOneselfTypeList
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -91,6 +91,7 @@
|
||||
<Compile Include="Abstract\DeleteProvider\SplitTableDeleteProvider.cs" />
|
||||
<Compile Include="Abstract\DeleteProvider\DeleteablePage.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\CommonMethodInfo.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\DynamicOneselfType.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\DynamicProperyBuilder.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\Helper.cs" />
|
||||
<Compile Include="Abstract\DynamicBuilder\EmitTool.cs" />
|
||||
|
Reference in New Issue
Block a user