Reputation: 408
I Have small question about general convention:
Is Creating some controllers that we can call "shared" in general is a good approach? What do You think about that, and maybe You have some alternatives ?
i.e. : I have controller "User" - It's common controller, some authenticate method, profile edit etc. Beside that I create "UserShared" controller - I'll use it in many views (Html.RenderAction) to get some PartialViews i.e. AccountMenu, MessageStatus etc. My intention of that approach is to make views as dumb as it's possible and don't mix "shared" (in most cases returns only PartialViewResult) actions and common one.
Upvotes: 2
Views: 3447
Reputation: 8199
If functionality is common across controller you can use base controller. Some may argue against it due to coupling issue. You may read here and here
Upvotes: 2