public bool deleteDashboard(int dashboardID) { try { StoredProcedureDataContext dbmlobject = new StoredProcedureDataContext(); var result = dbmlobject.RetreiveExistingDashboardItems(dashboardID, "nothing").ToList(); foreach (var item in result) { dbmlobject.DeleteDashboardItem(item.ItemID); } dbmlobject.DeleteDashboard(dashboardID); dbmlobject.SubmitChanges(); } catch (Exception e) { throw e; } return(true); }