public async Task <BillingsResult> SavingSetAsync(string SessionKey, IEnumerable <Billing> billings, IEnumerable <Customer> customers) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var result = (await mfBillingProcessor.SaveAsync(new MFBillingSource { Billings = billings.ToArray(), Customers = customers.ToArray(), }, token)).ToList(); return new BillingsResult() { Billings = result, ProcessResult = new ProcessResult() { Result = true } }; }, logger)); }
public async Task <IEnumerable <Billing> > Save(MFBillingSource source, CancellationToken token) => (await mfBillingProcessor.SaveAsync(source, token)).ToArray();