See the ASP.NET Core Identity with MongoDB as Database {Detailed}
Check the Blow Links:
Create Identity User
Create Identity Role