protected string DisplayFailReason(ValidationFailReason reason) { switch (reason) { case ValidationFailReason.NullabilityViolation: return "отсутствует значение обязательного столбца"; case ValidationFailReason.TypeConvertionFailure: return "некорректный формат данных"; case ValidationFailReason.MaxLengthViolation: return "размер данных столбца превышает максимальную длину"; default: return string.Empty; } }
public UserNotValidatedException(ValidationFailReason failReason, string userLoginName) : base($"User Validation Failed.") { UserLoginName = userLoginName; ValidationFailReason = failReason; }