From c5d2b8497242f449d1c2ac5a70e8d5ce50de78de Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 29 Sep 2022 21:27:39 +0800 Subject: [PATCH] Synchronization code --- Src/Asp.NetCore2/SqlSugar/Enum/DataFilterType.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Enum/DataFilterType.cs b/Src/Asp.NetCore2/SqlSugar/Enum/DataFilterType.cs index 039ab15f9..739edf121 100644 --- a/Src/Asp.NetCore2/SqlSugar/Enum/DataFilterType.cs +++ b/Src/Asp.NetCore2/SqlSugar/Enum/DataFilterType.cs @@ -30,6 +30,14 @@ namespace SqlSugar } this.EntityColumnInfo.PropertyInfo.SetValue(EntityValue, value); } + public bool IsAnyAttribute() where T : Attribute + { + return this.EntityColumnInfo.PropertyInfo.GetCustomAttribute() != null; + } + public T GetAttribute() where T : Attribute + { + return this.EntityColumnInfo.PropertyInfo.GetCustomAttribute(); + } } public class DataAfterModel {