Пример #1
0
 private async Task RemoveBasket(string userId)
 {
     try
     {
         await basketService.RemoveBasket(userId);
     }
     catch (Exception ex)
     {
         logger.LogError(ex.Message);
         throw;
     }
 }
Пример #2
0
        public async Task Consume(ConsumeContext <LoggedOutEvent> context)
        {
            ValidateSessionId(context);

            await basketRedisService.RemoveBasket(context.Message.SessionId);
        }
        public async Task <Unit> Handle(ClearBasketCommand request, CancellationToken cancellationToken)
        {
            await basketRedisService.RemoveBasket(request.UserId);

            return(Unit.Value);
        }