public async Task <CustomerDiscountsResult> GetDiscountAsync(string SessionKey, int customerId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var result = (await customerDiscountProcessor.GetAsync(customerId, token)).ToList(); return new CustomerDiscountsResult { ProcessResult = new ProcessResult { Result = true }, CustomerDiscounts = result, }; }, logger)); }
public async Task <ActionResult <IEnumerable <CustomerDiscount> > > GetDiscount([FromBody] int customerId, CancellationToken token) => (await customerDiscountProcessor.GetAsync(customerId)).ToArray();