title: Creating users in AspNetUsers from a console application
body: <p>I need to imports hundreds of users from a CSV file into the AspNetUsers table that's created for an ASP.NET MVC5 Web App.</p>
  
  <p>I thought I'd write a quick console application to insert the relevant information for each user but there is one problem, the password. </p>
  
  <p>This is how a user is created in ASP.NET:</p>
  
  <pre><code>var result = await UserManager.CreateAsync(user, model.Password);
  </code></pre>
  
  <p>but how can I do this from a Console Application? Whatever random password I'll create for each user needs to be encrypted in such a way that it can be decrypted by the ASP.NET MVC Web app.</p>
  
  <p>Is there an easy way to achieve this? I started to import one class from ASP.NET MVC, and before you know it, I had to import another, and another... </p>
  
  <p>So I stopped and decided to ask the question on SO as it's seems like an overkill and hopefully there is an easier way to do this.</p>
  
  <p>Any suggestions would be appreciated.</p>
  
  <p>Thanks.</p>