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.
I thought I'd write a quick console application to insert the relevant information for each user but there is one problem, the password.
This is how a user is created in ASP.NET:
var result = await UserManager.CreateAsync(user, model.Password);
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.
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...
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.
Any suggestions would be appreciated.
Thanks.