Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to latest versions #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

steentottrup
Copy link

With the release of the new Mongo driver (version 2), I've updated the project to use that, and I've also updated to the latest (version 2.2) Identity assembly.

@SteveVaneeckhout
Copy link

Great start!
However, you replaced all the spaces with tabs. I prefer tabs too but since this project uses spaces it's best to keep it that way. Now we have no idea which lines you changed.

public Task<TUser> FindByIdAsync(string userId) {
ThrowIfDisposed();

return Task.FromResult(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement can be simplified to:
return db.GetCollection<TUser>(collectionName).Find(u => u.Id == userId).SingleOrDefaultAsync();

@steentottrup
Copy link
Author

Ups, sorry, had no idea that happened. Should be sorted now?

TUser user = db.GetCollection<TUser>(collectionName).FindOne((Query.EQ("UserName", userName)));
return Task.FromResult(user);

return Task.FromResult(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify, like FindByIdAsync()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants