コード例 #1
0
        protected override async Task <IContactAccountCollection> GetDataAsync(IGetDebtorAccountCollectionQuery query)
        {
            NullGuard.NotNull(query, nameof(query));

            IContactAccountCollection contactAccountCollection = await AccountingRepository.GetContactAccountsAsync(query.AccountingNumber, query.StatusDate);

            if (contactAccountCollection == null)
            {
                return(null);
            }

            IContactAccountCollection calculatedAccountCollection = await contactAccountCollection.CalculateAsync(query.StatusDate);

            if (calculatedAccountCollection == null)
            {
                return(null);
            }

            return(await calculatedAccountCollection.FindDebtorsAsync());
        }
        protected override Task <IContactAccountCollection> GetDataAsync(IGetContactAccountCollectionQuery query)
        {
            NullGuard.NotNull(query, nameof(query));

            return(AccountingRepository.GetContactAccountsAsync(query.AccountingNumber, query.StatusDate));
        }