Ejemplo n.º 1
0
        public void ValidateModel(TModel model)
        {
            RulesException.ErrorsForValidationResults(ValidateModelProperties(model));
            ValidateModelRules(model);

            RulesException.ThrowException();
        }
Ejemplo n.º 2
0
        public async Task ValidateModelAsync(TModel model)
        {
            RulesException.ErrorsForValidationResults(ValidateModelProperties(model));
            await ValidateModelRulesAsync(model);

            RulesException.ThrowException();
        }