mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
Add English comments for JsonMap extension package.
This commit is contained in:
parent
a5b5af4024
commit
39ac2d8286
@ -1,13 +1,11 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace FreeSql.DataAnnotations
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// When the entity class property is <see cref="object"/>, map storage in JSON format. <br />
|
||||
/// 当实体类属性为【对象】时,以 JSON 形式映射存储
|
||||
/// </summary>
|
||||
public class JsonMapAttribute : Attribute
|
||||
{
|
||||
}
|
||||
public class JsonMapAttribute : Attribute { }
|
||||
}
|
@ -5,7 +5,6 @@ using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
public static class FreeSqlJsonMapCoreExtensions
|
||||
@ -24,6 +23,7 @@ public static class FreeSqlJsonMapCoreExtensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When the entity class property is <see cref="object"/> and the attribute is marked as <see cref="JsonMapAttribute"/>, map storage in JSON format. <br />
|
||||
/// 当实体类属性为【对象】时,并且标记特性 [JsonMap] 时,该属性将以JSON形式映射存储
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
@ -43,7 +43,7 @@ public static class FreeSqlJsonMapCoreExtensions
|
||||
});
|
||||
}
|
||||
|
||||
that.Aop.ConfigEntityProperty += new EventHandler<FreeSql.Aop.ConfigEntityPropertyEventArgs>((s, e) =>
|
||||
that.Aop.ConfigEntityProperty += (s, e) =>
|
||||
{
|
||||
var isJsonMap = e.Property.GetCustomAttributes(typeof(JsonMapAttribute), false).Any() || _dicJsonMapFluentApi.TryGetValue(e.EntityType, out var tryjmfu) && tryjmfu.ContainsKey(e.Property.Name);
|
||||
if (isJsonMap)
|
||||
@ -61,7 +61,6 @@ public static class FreeSqlJsonMapCoreExtensions
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user