Exemple #1
0
        public void OnValidationFailed(BusinessRuleValidationException businessRuleValidationException)
        {
            foreach (var error in businessRuleValidationException.ValidationResults.Where(x => x != BusinessRuleValidationResult.Success))
            {
                loggingService.Log(error.ErrorMessage);

                applicationIssueUnitOfWork.CustomerAppId = customerApp.CustomerAppId;
                applicationIssueUnitOfWork.DateTime = DateTime.Now;
                applicationIssueUnitOfWork.Severity = ApplicationIssueSeverity.High;
                applicationIssueUnitOfWork.Message = error.BusinessRuleName;
                applicationIssueUnitOfWork.Details = error.ErrorMessage;
                applicationIssueUnitOfWork.Commit();
             			}
        }
Exemple #2
0
 private void CreateValidationFailed(BusinessRuleValidationException businessRuleValidationException)
 {
     foreach (var error in businessRuleValidationException.ValidationResults.Where(x => x != BusinessRuleValidationResult.Success))
     {
         ModelState.AddModelError("SKU." + error.PropertyName, error.ErrorMessage);
     }
 }
 private void CreateValidationFailed(BusinessRuleValidationException businessRuleValidationException)
 {
     foreach (var error in businessRuleValidationException.ValidationResults.Where(x => x != BusinessRuleValidationResult.Success))
     {
         ModelState.AddModelError(error.PropertyName != null ? "DomainLicense." + error.PropertyName : string.Empty, error.ErrorMessage);
     }
 }