I am creating a User using ASP.NET Core Identity as follows:
User user = new User {
Email = "john@domain.com",
Name = "John"
};
await manager.CreateAsync(user, "JohnPass");
I get an error saying the Username is invalid because it is null.
How to configure Identity to use the Email as Username?
Or do I need to manually set the Username equal to the Email?