title: EntityFrameworkCore Identity
body: <p>I have created a brand new ASP.Net Core web application, and enabled Identity services.  The framework helpfully creates me a number of view and view models to handle the task to creating, validating and removing users; however, I'm a little confused about the EF component of this (I'm quite a newcomer to EF, so I'm possibly missing something).</p>
  
  <p>The AccountController has <code>UserManager&lt;ApplicationUser&gt; userManager</code> injected into it and, for example, for account creation, calls something like:</p>
  
  <pre><code>var result = await _userManager.CreateAsync(user, model.Password);
  </code></pre>
  
  <p>As I understand what this is doing, it is calling functionality within <code>Microsoft.AspNetCore.Identity</code> that maps (directly) to a table in the DB (by default dbo.ASPNetUsers - or similar).  Typically, I would expect such functionality to sit in a service which communicates with the DB; this provides a layer of abstraction and a gateway to the database.</p>
  
  <p>My question is, is the above functionality giving the same thing in some sense, or are we, effectively, communicating directly with the DB from the web site?</p>