我遇到了 WCF 服务操作问题。我从数据库中获取密码值,当它应该传递它时返回错误值。我究竟做错了什么?
public bool LogIn(string userId, string passwd)
{
bool prompt;
ProgDBEntities context = new ProgDBEntities();
IQueryable<string> haslo = (from p in context.UserEntity where p.UserID == userId select p.Passwd);
bool passOk = String.Equals(haslo, passwd);
if (passOk == true )
{
prompt = true;
}
else
{
prompt = false;
}
return prompt;
}