first of all, do not use
object[]
s. generics should be your first choice when applicable.
If you use linq to sql, you can select values from
DataContext [
^] like :
var level0 = dataContext.Menu_masters.ToList();
var level1 = dataContext.SubmenuParent_masters.ToList();
var level2 = dataContext.Submenu_child_masters.ToList();
but there exists better. If you mean by "menu" as
MainMenu[
^],
then you can store all your menu items in one table with foreign key values. you can use this table to create your menu.