protected override async Task PrepareReadAsync(AccountingIdentificationState accountingIdentificationState) { NullGuard.NotNull(accountingIdentificationState, nameof(accountingIdentificationState)); _accountingModel ??= await _accountingModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier); _accountModelCollection ??= await _accountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier); _budgetAccountModelCollection ??= await _budgetAccountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier); _contactAccountModelCollection ??= await _contactAccountModelHandler.ForAsync(accountingIdentificationState.AccountingIdentifier); if (_numberOfPostingLines.HasValue || _applyingPostingLines) { await ForAsync(accountingIdentificationState.AccountingIdentifier, false); } }
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); }