예제 #1
0
 /// <summary>
 /// It is used to validate user credencials
 /// </summary>
 /// <param name="loginModel"></param>
 /// <returns></returns>
 public string ValidateLogin(LoginModel loginModel)
 {
     if (Validations.ValidateEmailAddress(loginModel.EmailAddress).Equals(StringLiterals._success))
     {
         if (Validations.ValidatePassword(loginModel.Password).Equals(StringLiterals._success))
         {
             return(authRepo.ValidateLogin(loginModel));
         }
         return(Validations.ValidatePassword(loginModel.Password));
     }
     return(Validations.ValidateEmailAddress(loginModel.EmailAddress));
 }
예제 #2
0
        public bool ValidateLogin(LoginModel loginModel)
        {
            AuthenticationRepo authRepo = new AuthenticationRepo();

            return(authRepo.ValidateLogin(loginModel));
        }