mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 优化 支持实体类使用 new 重写属性;
This commit is contained in:
@ -163,7 +163,11 @@ public static partial class FreeSqlGlobalExtensions
|
||||
var dict = new Dictionary<string, PropertyInfo>(StringComparer.CurrentCultureIgnoreCase);
|
||||
foreach (var prop in props)
|
||||
{
|
||||
if (dict.ContainsKey(prop.Name)) continue;
|
||||
if (dict.TryGetValue(prop.Name, out var existsProp))
|
||||
{
|
||||
if (existsProp.DeclaringType != prop) dict[prop.Name] = prop;
|
||||
continue;
|
||||
}
|
||||
dict.Add(prop.Name, prop);
|
||||
}
|
||||
return dict;
|
||||
|
Reference in New Issue
Block a user