public async Task <InvoiceNumberHistoriesResult> GetInvoiceNumberHistoriesAsync(string SessionKey, int CompanyId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var result = await invoiceNumberHistoryProcessor.GetItemsAsync(CompanyId, token); return new InvoiceNumberHistoriesResult { ProcessResult = new ProcessResult { Result = true }, InvoiceNumberHistories = result.ToList(), }; }, logger)); }
public async Task <ActionResult <IEnumerable <InvoiceNumberHistory> > > GetInvoiceNumberHistories([FromBody] int companyId, CancellationToken token) => (await invoiceNumberHistoryProcessor.GetItemsAsync(companyId, token)).ToArray();