Ejemplo n.º 1
0
 public static void SaveTraderSettings(TraderModelBase trader) => UseForexMongo(c => {
     var ts = c.TraderSettings.Find(trader._key);
     if (ts == null)
     {
         c.TraderSettings.Add(traderMapper2.Map <TraderModelPersist>(trader));
     }
     else
     {
         traderMapper2.Map(trader, ts);
     }
 }, true);
Ejemplo n.º 2
0
 public static void LoadTradeSettings(TraderModelBase trader) => UseForexMongo(c
                                                                               => c.TraderSettings.Find(TraderModelPersist.CurrentDirectory()).YieldNotNull().ForEach(o => traderMapper.Map(o, trader)));