I\'m having an issue seeding my database with users and roles.
The User and the Role are both created (I can see them in the database after the error is thrown).
To add to Mark's post above in its still pretty much the same in .NET Core 3.1 Identity only difference with the async method IsInRoleAsync you have to pass in the IdentityUser type object:
var userInRole = await _userManager.IsInRoleAsync(user, role);
Then you can apply your logic afterwards (in my case I was doing two things, first checking the role actually exists and then checking if the user isn't already assigned to that role).