title: ASP.NET MVC Helpers for common functionality
body: <p>I appologize if this is a possible duplication, I've looked everywhere and couldn't find an answer.</p>
  
  <p>My question is more of a "best practice/convention"-sort of question.</p>
  
  <p>So here is my situation, I'm having an AccountController -> something like this:</p>
  
  <pre><code>    public AccountController(IAuthenticationHelper authHelper, 
                               IAccountService accountService)
      {
          _authHelper     = authHelper;
          _accountService = accountService;
      }
  </code></pre>
  
  <p>In my _Layout view, I have a placeholder for the currently logged in account. In order to get the currently logged in account, I'm retrieving the current user identity from the HttpContext (which I have in a wrapper class so I can unit test it) -> then I'm getting the account details from the DB.</p>
  
  <p>Now here is my question, I need this data In the _Layout, I could possibly do a partial view   expecting an account model -> place it in the _Layout ... And here is where I get stuck, I don't like the idea of so many trips to the database, and I don't like the fact that I have to think about this small detail from within all Actions ? Am I missing something here, am I thinking of this wrong ? Did I got the concept wrong ? What's the right way to do this ? (In a testable manner, preferably).</p>
  
  <p>Help is much appreciated !</p>
  
  <p>EDIT: I'll be happy to provide with more code, if required.</p>