Beispiel #1
0
        public IEnumerable <ModelValidationResult> Validate()
        {
            var balanceResult = Balance.ValidateMoney(nameof(Balance));

            if (balanceResult != null)
            {
                yield return(balanceResult);
            }
            var dateResult = CreationDate.ValidateDateTime(nameof(CreationDate));

            if (dateResult != null)
            {
                yield return(dateResult);
            }
            var accountTypeResult = AccountType.ValidateAccountType(nameof(AccountType));

            if (accountTypeResult != null)
            {
                yield return(accountTypeResult);
            }
        }