using (SqlConnection connection = new SqlConnection (ConnectionString)) {SqlCommand command = new SqlCommand («ВЫБРАТЬ пароль от пользователей, где Email = '" + UserEmail + "';", соединение);connection.Open ();
SqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
PasswordFromDatabase = reader.GetString(0);
}
}
reader.Close();
}
if (SimpleHash.VerifyHash(UserPassword, PasswordFromDatabase))
{
return true;
}