Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public class UserRepository : CommonRepository<User, Guid>
  2. {
  3. public async Task<bool> IsLoginExists(string email)
  4. {
  5. return await ExistsAsync(user => user.Email == email);
  6. }
  7.  
  8. public async Task<bool> CheckLoginPassword(string email, string password)
  9. {
  10. return await ExistsAsync(user => user.Email == email && user.Password == password);
  11. }
  12.  
  13. public User GetByEmail(string email)
  14. {
  15. return FindOne(user => user.Email == email);
  16. }
  17. }
  18.  
  19. set users:9001 "{id: 9001, email: leto@dune.gov, ...}"
  20. hset users:lookup:email leto@dune.gov 9001
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement