Stuck in user management

How to complete the five methods.

I am stuck at the second one, and have no idea of how to make the others.

Here is the line I completed the first one.

return await _usersCollection
.Find(Builders.Filter.Eq(x => x.Email, email))

And second one,

user = new User(string name, string email)
this.Name = name
this.Email = email
await _usersCollection.InsertOneAsync(newUser);

How to initiate the new user?

Check this.It may help

AddUserAsync - no write concern method on InsertOneAsync

This solves part of my problem; I have problems on how to create a new user with the three parameters. Can you help me with that as well?

Hi @Ningran_Meng, I am a little confused here, can you please post the expected input, output and behavior you are trying to achieve?

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

I have figure it out. The problem was that I have input the following

var user = new User(string name, string email)
Name = name,
Email = email,
HashedPassword = Password. Hash()

And visual studio changed the offered model file and controller file without my awareness.