static void FillTestData() { long count = Db.SQL <long>("SELECT COUNT(g) FROM Simplified.Ring6.Graph g").First; if (count > 5) { return; } Db.Transact(() => { Simplified.Ring6.Graph gr = new Simplified.Ring6.Graph() { Name = "Graph" + (count + 1), Description = "Test graph " + (count + 1) }; string[] names = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames; for (int i = 0; i < names.Length; i++) { GraphValue v = new GraphValue() { Graph = gr, XValue = i + 1, XLabel = names[i], YValue = Math.Round(1.0M / ((i + 1) / (decimal)(names.Length / 2)), 4) }; } }); }
static void FillTestData() { long count = Db.SQL<long>("SELECT COUNT(g) FROM Simplified.Ring6.Graph g").First; if (count > 5) { return; } Db.Transact(() => { Simplified.Ring6.Graph gr = new Simplified.Ring6.Graph() { Name = "Graph" + (count + 1), Description = "Test graph " + (count + 1) }; string[] names = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames; for (int i = 0; i < names.Length; i++) { GraphValue v = new GraphValue() { Graph = gr, XValue = i + 1, XLabel = names[i], YValue = Math.Round(1.0M / ((i + 1) / (decimal)(names.Length / 2)), 4) }; } }); }