title: Poor DependencyInjection CustomMembershipProvider possibilities?
body: <p>Trying to inject a repository into my <code>CustomMembershipProvider</code>.</p>
  
  <p>Let me start that I am <strong>not</strong> in fond of the <strong><code>Singleton</code> pattern</strong> or some other <em>global public</em> solutions. </p>
  
  <p>Here is a sample of the <code>CustomMemberhipProvider</code></p>
  
  <pre><code>public class CustomMembershipProvider : BaseMembershipProvider
  {
      private readonly UserRepository _userRepository;
  
      public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
      {
          // Magically pull the userrepository in here?
          base.Initialize(name, config);
      }
  }
  </code></pre>
  
  <p>The only working example I found so far is to add a <code>Factory</code>, which is yet-another-alternative for some <code>global public</code> class.</p>
  
  <ul>
  <li>Is there nothing out there that allows me properly inject an object (<code>UserRepository</code>) to the <code>CustomMembershipProvider</code>?</li>
  <li>If not, is there a good alternative? I am not married to the CustomMembershipProvider, so if there is something else out there that allows me to use <code>[Authorize]</code> attributes in my controller, then I'm all for it.</li>
  </ul>
  
  <p>Thanks a lot in advance!</p>