C#:实体类中做数据验证
主要是在实体类中验证using System;namespace Jone.Function.attribute{ /// summary /// 附加在数据实体用于描述如何验证合法性 /// /summary [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class ValidateAttribute : Attribute { private bool _allowNull = tr