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