From cc25a51445e99f47d3e4a35f69f48ce53bf66142 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Thu, 29 Sep 2022 21:25:49 +0800 Subject: [PATCH] Update DataFilterModel --- Src/Asp.Net/SqlSugar/Enum/DataFilterType.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Enum/DataFilterType.cs b/Src/Asp.Net/SqlSugar/Enum/DataFilterType.cs index 039ab15f9..739edf121 100644 --- a/Src/Asp.Net/SqlSugar/Enum/DataFilterType.cs +++ b/Src/Asp.Net/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 {