public async Task DeactivateCurrencyPair(IRequestContext context, DeactivateCurrencyPairRequestDto request) { Log.Information("Received deactivate for currency pair {currencyPair} for user {username}", request.CurrencyPair, context.Username); var currencyPair = await _repository.GetById <CurrencyPair>(request.CurrencyPair); currencyPair.Deactivate(); await _repository.SaveAsync(currencyPair); Log.Information("Currency pair {currencyPair} deactivated", request.CurrencyPair); }
public async Task DeactivateCurrencyPair(IRequestContext context, DeactivateCurrencyPairRequestDto request) { if (Log.IsInfoEnabled) { Log.Info($"Received deactivate for currency pair {request.CurrencyPair} for user {context.UserSession.Username}"); } var currencyPair = await _repository.GetById <CurrencyPair>(request.CurrencyPair); currencyPair.Deactivate(); await _repository.SaveAsync(currencyPair); if (Log.IsInfoEnabled) { Log.Info($"Currency pair {request.CurrencyPair} deactivated"); } }