So I am using asp.net core user (Authentication and Authorization system). I have seeded my tables newly default tables need for user and roles management have been created but they are all empty.
So I am trying to create a new user.
var user = new ApplicationUser { Firstname = model.Firstname,Lastname = model.Lastname, UserName = model.Email, Email = model.Email, }; var result = await _userManager.CreateAsync(user, model.Password);
But when I send values to my action method var result = ends up been equals to null. This is causing a null pointer exception. What am I doing wrong. I felt user should be created on the spot. Do I need to seed roles. I dont konw what do here.
Thanks alot.
Best Regards.