private void UpdateOrderMessageToDatabase(OpenOrderMessage orderMessage) { //Task.Factory.StartNew(() => //{ try { var order = IBTradingService.ConvertOpenOrderMessageToOrder(orderMessage, this); new DatabaseRepository.TradeDatabase().Order_Upsert(order); } catch (Exception ex) { _log.Error(ex.Message); _log.Error(ex.StackTrace); } //}); }
private void UpdateExecutionMessageToDatabase(ExecutionMessage executionMessage) { //Task.Factory.StartNew(() => //{ try { var trade = IBTradingService.ConvertExecutionToTrade(executionMessage, this); new DatabaseRepository.TradeDatabase().Trade_Upsert(trade); } catch (Exception ex) { _log.Error(ex.Message); _log.Error(ex.StackTrace); } //}); }