I've started in Visual Studio with a new project > ASP NET 5 > Web Application and then followed the initial tutorial here:
https://docs.asp.net/projects/mvc/en/latest/getting-started/first-mvc-app/index.html
One of the tasks I've been struggling with is seeding the database with Users, Roles, and then assigning the Roles to the Users.
This answer, or variations of it look fruitful: https://stackoverflow.com/a/20521530/2591770
But this code:
var store = new UserStore<ApplicationUser>(context);
var manager = new UserManager<ApplicationUser>(store);
var user = new ApplicationUser {UserName = "founder"};
Results in an immediate error.
CS7036 There is no argument given that corresponds to the required formal parameter 'optionsAccessor' of 'UserManager.UserManager(IUserStore, IOptions, IPasswordHasher, IEnumerable>, IEnumerable>, ILookupNormalizer, IdentityErrorDescriber, IServiceProvider, ILogger>, IHttpContextAccessor)'
Is this a change in the framework or is it likely I've omitted something elsewhere?
I can null the rest of the parameters but can't help feeling that I've missed something.
var userManager = new UserManager<ApplicationUser>(userStore,null,null,null,null,null,null,null,null,null);