public User Login(User user) { var _user = _authRepository.Get(x => x.Email == user.Email); if (_user == null) { return(null); } if (HashMD5.Create(user.Password) != _user.Password) { return(null); } return(_user); }
public User Register(User user) { user.Password = HashMD5.Create(user.Password); return(_authRepository.Add(user)); }