public RedirectResult AddGraph(Graph graph) { DashboardItem dbi; if (graph.GraphType == GraphType.Single || graph.GraphType == GraphType.SingleTrend) { dbi = new DashboardItem(0, 1, 1000, 8, 5, graph); } else { dbi = new DashboardItem(0, 1, 1000, 15, 9, graph); } dbmanager.AddDashboardItem(dbi); List <DashboardItem> dbitems = dbmanager.GetAllDashboardItems(); return(Redirect("Index")); }