title: .NET MVC Dependency Injection on Models?
body: <p><strong>Question: Is there a way to use Ninject to inject dependencies into my MVC Models?</strong></p>
  
  <p>First of all, I am new to MVC and DI (and stackoverflow, btw), so I wanted to make sure I'm going down the proper path with this problem. I've been Googling the answer for days, but I can't find a clean explanation...  I'm using C#, .NET4, MVC3, Ninject, and VS2010.</p>
  
  <p>Here's the scenario: I have a new user form where a user can set their login, roles, and set other profile data.  When this gets submitted, I need to save the login info to the MembershipProvider, the roles to the RoleProvider, etc...  Its gets a little hairy because I am using dual providers (Active Directory / local database) as per my project requirements, so there is a bit of logic in determining which provider to save to, if the user already exists, if they are allowed to self-identify any roles, and so on. </p>
  
  <p>I feel like this logic should go in a .Save() method on my model. <em>However, I then need to inject instances of my providers into my model, and Ninject doesn't seem to inject models</em> (at least not using the default setup that the NuGet package comes with). Hence my initial question. </p>
  
  <p>I can think of some alternatives... </p>
  
  <ol>
  <li>Maybe the model is a bad place for this logic to begin with and I should abstract the logic into a service? But making a service just for this one save function seems like overkill to me. </li>
  <li>I could just eat the bloat in my controller...but I am told that "fat" controllers are a bad practice. </li>
  <li>I suppose I could instead inject my providers into my controller, and then pass those dependencies to my model, but that seems a bit wonky.</li>
  </ol>
  
  <p>So... <strong>Is there a way to Ninject the model or do I need to re-factor because I am a newbie at this?</strong></p>