I have a partial (user control) that shows a menu of links. It lives on my masterpage. If you are an admin, you should see a different menu from others.
I have a method in my Member class called: IsAdmin(). Normally it would be very easy to just put some logic in the partial declaratively to show the right menu if someone is an admin, such as:
<% if (member.IsAdmin()) { %>
But since I am using Ninject for dependency injection and my Member class cannot be instantiated without the required dependencies (an IMemberRepository) I am not sure how to do this in my partial. I know that Ninject can supply a the repository to my Controller class' constructor, but I do not knowhow to do this in a partial.