我有一个WCF服务操作的问题。我从数据库获得passwod值,当它通过时它返回false值。我究竟做错了什么?WCF服务操作总是返回false
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;
}
它的工作原理:d非常感谢你:) – bohunn 2013-03-01 21:36:29