public static void InsertStrategy(string strategy) { BlackTD0DataContext blackTD0 = new BlackTD0DataContext(); if (!blackTD0.ASTRATEGies.Any(p => p.STRATEGY == strategy)) { ASTRATEGY tmps = new ASTRATEGY(); if (blackTD0.ASTRATEGies.Count() > 0) tmps.ANO = blackTD0.ASTRATEGies.Max(p => p.ANO) + 1; else tmps.ANO = 0; tmps.STRATEGY = strategy; blackTD0.ASTRATEGies.InsertOnSubmit(tmps); blackTD0.SubmitChanges(); } }
public static void InsertStrategy(string strategy) { WhiteQlearningDataContext whiteQlearning = new WhiteQlearningDataContext(); if (!whiteQlearning.ASTRATEGies.Any(p => p.STRATEGY == strategy)) { ASTRATEGY tmps = new ASTRATEGY(); if (whiteQlearning.ASTRATEGies.Count() > 0) tmps.ANO = whiteQlearning.ASTRATEGies.Max(p => p.ANO) + 1; else tmps.ANO = 0; tmps.STRATEGY = strategy; whiteQlearning.ASTRATEGies.InsertOnSubmit(tmps); whiteQlearning.SubmitChanges(); } }
partial void UpdateASTRATEGY(ASTRATEGY instance);
partial void DeleteASTRATEGY(ASTRATEGY instance);
partial void InsertASTRATEGY(ASTRATEGY instance);