MvcTemplate.Validators.AccountValidator.IsAuthenticated C# (CSharp) Method

IsAuthenticated() private method

private IsAuthenticated ( String username, String password ) : System.Boolean
username String
password String
return System.Boolean
        private Boolean IsAuthenticated(String username, String password)
        {
            String passhash = UnitOfWork
                .Select<Account>()
                .Where(account => account.Username.ToLower() == username.ToLower())
                .Select(account => account.Passhash)
                .SingleOrDefault();

            Boolean isCorrect = Hasher.VerifyPassword(password, passhash);
            if (!isCorrect)
                Alerts.AddError(Validations.IncorrectAuthentication);

            return isCorrect;
        }
        private Boolean IsCorrectPassword(Int32 accountId, String password)