-
Notifications
You must be signed in to change notification settings - Fork 91
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
base: master
Are you sure you want to change the base?
Conversation
Great start! |
public Task<TUser> FindByIdAsync(string userId) { | ||
ThrowIfDisposed(); | ||
|
||
return Task.FromResult( |
There was a problem hiding this comment.
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();
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify, like FindByIdAsync()
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.