title: Dependency Injection for my custom UserManager WITHOUT Identity
body: <p>I am currently trying to make my own AccountController with its own UserManager in ASP.Net Core 2.1.
  The UserManager should manage user related processes such as validation, registration, password change, etc in the database and I want it to be passed as a parameter in the AccountController constructor. I have already configured the storage with <code>services.AddDbContext&lt;CustomDB&gt;(...)</code>
  The problem I cannot figure out is how should I inject the UserManager (what should its lifetime be - Singleton, Transient, Scoped). I do not want ot use Identity under any circumstances (that is the reason why I am creating a new one). In other words, I am looking for an alternative of <code>services.AddIdentity()</code> in order to inject my UserManager properly.</p>
  
  <p><strong>AccountControler.cs:</strong></p>
  
  <pre><code>public class AccountController : Controller
  {
          private readonly IUserManager _userManager;
  
          public AccountController(IUserManager userManager)
          {
              _userManager = userManager;
          }
  
          ...
  }
  </code></pre>
  
  <p><strong>Startup.cs:</strong></p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddSingleton&lt;IUserManager, UserManager&gt;();
      //or
      services.AddTransient&lt;IUserManager, UserManager&gt;();
      //or
      services.AddScoped&lt;IUserManager, UserManager&gt;();
  }
  </code></pre>