private async Task RemoveBasket(string userId) { try { await basketService.RemoveBasket(userId); } catch (Exception ex) { logger.LogError(ex.Message); throw; } }
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); }