public void AddRegressionJobStat() { var db = new DatsystemsEntities(); var newRegressionJobStat = new RegressionJobStat { JobStat = "", RegressionJobId = 1 }; db.RegressionJobStats.Add(newRegressionJobStat); db.SaveChanges(); }
public int AddRegressionJob(string instrumentCode, DateTime startDate, DateTime endDate, int barInterval, string strategyName, bool isDaily, string name) { dbcontext.RegressionJobs.Add(new RegressionJob { InstrumentCode = instrumentCode, JobStatus = "Pending", FinishedAt = null, RegressionBarInterval = barInterval, RegressionDisplayName = name, RegressionEndDate = endDate, RegressionStartDate = startDate, RegressionIntraDayEnvironment = null, RegressionIsDaily = isDaily, RegressionMacroEnvironment = null, RegressionMicroEnvironment = null, RegressionStrategyName = name, SubmittedAt = DateTime.UtcNow }); //dbcontext.RegressionJob_Insert(instrumentCode, startDate, endDate, barInterval, strategyName, // isDaily); return(dbcontext.SaveChanges()); }
public void AddRegressionJobBar(int regressionJobUd, int index, Bar bar) { datsys.RegressionJobBars.Add(new RegressionJobBar { RegressionJobId = regressionJobUd, BarIndex = index, BarMin = bar.BarMin, BarMax = bar.BarMax }); datsys.SaveChanges(); }