public async Task ActivateCurrencyPair(IRequestContext context, ActivateCurrencyPairRequestDto request) { Log.Information("Received activate for currency pair {currencyPair} for user {username}", request.CurrencyPair, context.Username); var currencyPair = await _repository.GetById <CurrencyPair>(request.CurrencyPair); currencyPair.Activate(); await _repository.SaveAsync(currencyPair); Log.Information("Currency pair {currencyPair} activated", request.CurrencyPair); }
public async Task ActivateCurrencyPair(IRequestContext context, ActivateCurrencyPairRequestDto request) { if (Log.IsInfoEnabled) { Log.Info($"Received activate for currency pair {request.CurrencyPair} for user {context.UserSession.Username}"); } var currencyPair = await _repository.GetById <CurrencyPair>(request.CurrencyPair); currencyPair.Activate(); await _repository.SaveAsync(currencyPair); if (Log.IsInfoEnabled) { Log.Info($"Currency pair {request.CurrencyPair} activated"); } }