예제 #1
0
        protected override async Task PrepareReadAsync(AccountingIdentificationState accountingIdentificationState)
        {
            NullGuard.NotNull(accountingIdentificationState, nameof(accountingIdentificationState));

            _accountingModel ??= await AccountingModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);

            if (_includePostingLines == false || PostingLineModelHandler == null)
            {
                return;
            }

            _postingLineModelCollection ??= await PostingLineModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);
        }
예제 #2
0
        protected override async Task PrepareReadAsync(AccountingIdentificationState accountingIdentificationState)
        {
            NullGuard.NotNull(accountingIdentificationState, nameof(accountingIdentificationState));

            if (_includeAccounts)
            {
                _accountModelCollection ??= await _accountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);

                _budgetAccountModelCollection ??= await _budgetAccountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);

                _contactAccountModelCollection ??= await _contactAccountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);
            }

            if (_includePostingLines == false)
            {
                return;
            }

            _postingLineModelCollection ??= await _postingLineModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier);
        }