title: Perform multiple ASP.NET Core Identity UserManager calls atomically
body: <p>In my system, username and email are the same. I want to make multiple <code>UserManager</code> calls atomically, e.g.</p>
  <pre class="lang-cs prettyprint-override"><code>userManager.ChangeEmailAsync(...);
  userManager.SetUserNameAsync(...);
  </code></pre>
  <p>On <a href="https://github.com/dotnet/aspnetcore/issues/10260" rel="nofollow noreferrer">the repo</a> it was explained that this cannot be done with <code>UserManager</code>, as it doesn't directly support transactions.</p>
  <p>However <code>UserManager</code> relies on a <code>DbContext</code>. Is there a way to use a context transaction to perform an atomic operation as above?</p>