using System.Diagnostics.CodeAnalysis; namespace System.Application.Services { /// /// 模型验证 /// public interface IModelValidator { /// /// 验证模型,返回结果以及错误消息 /// /// /// /// /// bool Validate(object model, [NotNullWhen(false)] out string? errorMessage, params Type[] ignores); /// public bool Validate(object model, params Type[] ignores) => Validate(model, out var _, ignores); } }