Guest User

Untitled

a guest
Feb 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. new MongoDbRepository<Registration>()
  2. .Query(user => user.Any(x => x.Email == userRegistration.Email)) //returns bool
  3.  
  4. new MongoDbRepository<Authentication>()
  5. .Query(auth => auth
  6. .Where(x => x.Email == Email)
  7. .Where(x => x.Password == Password)
  8. .FirstOrDefault()); // Returns single Authentication or null
  9.  
  10. new MongoDbRepository<Character>()
  11. .Query(c => c.Select(x => x.Name).ToList()); // Returns list of character names
Add Comment
Please, Sign In to add comment