This question is locked. New answers and comments are not allowed.
EDIT: The title of this post should read "referenced" instead of "references"
I have a menu setup in my application using the following overloads of the MenuBuilder...
Now I've found through logging that each of the controllers (2nd parameter of the above Action() methods) is actually instantiated on every render of the View that hosts the menu. Is this correct behavior? I'm just thinking it could lead to some inefficiencies if one happens to be doing data access or any other such operation in the constructor of those controllers. Please advise.
Thanks for a great product.
I have a menu setup in my application using the following overloads of the MenuBuilder...
.Items(menu => {
menu.Add().Text("Projects").Action("Index", "ProjectListing");
menu.Add().Text("Reports").Action("Index", "Reports");
menu.Add().Text("Methodologies").Action("Index", "Methodology");
menu.Add().Text("Users").Action("Index", "User");
menu.Add().Text("Roles").Action("Index", "ClientRole");
})
Now I've found through logging that each of the controllers (2nd parameter of the above Action() methods) is actually instantiated on every render of the View that hosts the menu. Is this correct behavior? I'm just thinking it could lead to some inefficiencies if one happens to be doing data access or any other such operation in the constructor of those controllers. Please advise.
Thanks for a great product.