示例#1
0
        public void ValidateModel(TModel model)
        {
            RulesException.ErrorsForValidationResults(ValidateModelProperties(model));
            ValidateModelRules(model);

            RulesException.ThrowException();
        }
示例#2
0
        public async Task ValidateModelAsync(TModel model)
        {
            RulesException.ErrorsForValidationResults(ValidateModelProperties(model));
            await ValidateModelRulesAsync(model);

            RulesException.ThrowException();
        }