title: Bulk User Creation in OwinContext (Performance)
body: <p>I am uploading a excel file containing all required users into my website using ASP.NET Identity and OwinContext and EF 6.
  My code looks like below:</p>
  
  <pre><code>foreach (var bulkUserDetail in bulkUser.BulkUserDetails)
  {
  
          var userManager = owinContext.GetUserManager&lt;ApplicationUserManager&gt;();
  
          var userProfile = new UserProfile();
  
          userProfile.Username = bulkUserDetail.Username;
  
  
          AspNetUser newUser = new AspNetUser
          {
              UserName = userProfile.Username,
              Email = bulkUserDetail.Email,
              LastPasswordChangedDate = null,
          };
  
          var creationResult = userManager.Create(newUser);
  
          if (creationResult.Succeeded)
          {
  
              string token = userManager.GeneratePasswordResetToken(newUser.Id);
  
          }
  
  }
  </code></pre>
  
  <p>The issue is that the performance of following two lines is pretty disappointing</p>
  
  <pre><code>userManager.Create(newUser) -- (900 milliseconds)
  userManager.GeneratePasswordResetToken(newUser.Id)      --(1800 milliseconds)
  </code></pre>
  
  <p>In large quantity, i.e 2000 users, the performance become a serious issue.
  Is there better a practice to speed up this process? I am open to suggestions but I have to keep the OwinContext library.</p>
  
  <p>Thanks in advance</p>