mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +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;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
namespace FreeSql.DataAnnotations
|
namespace FreeSql.DataAnnotations
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// When the entity class property is <see cref="object"/>, map storage in JSON format. <br />
|
||||||
/// 当实体类属性为【对象】时,以 JSON 形式映射存储
|
/// 当实体类属性为【对象】时,以 JSON 形式映射存储
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class JsonMapAttribute : Attribute
|
public class JsonMapAttribute : Attribute { }
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -5,7 +5,6 @@ using System.Collections.Concurrent;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
public static class FreeSqlJsonMapCoreExtensions
|
public static class FreeSqlJsonMapCoreExtensions
|
||||||
@ -24,6 +23,7 @@ public static class FreeSqlJsonMapCoreExtensions
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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形式映射存储
|
/// 当实体类属性为【对象】时,并且标记特性 [JsonMap] 时,该属性将以JSON形式映射存储
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <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);
|
var isJsonMap = e.Property.GetCustomAttributes(typeof(JsonMapAttribute), false).Any() || _dicJsonMapFluentApi.TryGetValue(e.EntityType, out var tryjmfu) && tryjmfu.ContainsKey(e.Property.Name);
|
||||||
if (isJsonMap)
|
if (isJsonMap)
|
||||||
@ -61,7 +61,6 @@ public static class FreeSqlJsonMapCoreExtensions
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user