Esempio n. 1
0
 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));
 }
Esempio n. 2
0
 public async Task <ActionResult <IEnumerable <CustomerDiscount> > > GetDiscount([FromBody] int customerId, CancellationToken token)
 => (await customerDiscountProcessor.GetAsync(customerId)).ToArray();