peshopbs2

Untitled

Mar 1st, 2020
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. using Data.Entities;
  2. using Data.Repository;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6.  
  7. namespace Data.Services
  8. {
  9. public class AuthenticationService
  10. {
  11. public User LoggedUser { get; set; }
  12.  
  13. public void AuthenticateUser(string username, string password)
  14. {
  15. UserRepository userRepository = new UserRepository(
  16. new VmDbContext());
  17.  
  18. this.LoggedUser = userRepository.GetOne(user =>
  19. user.Username == username &&
  20. user.Password == password);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment