1
我想写一个登录表单。登录表单使用实体框架和3层体系结构
我的代码是多少正确?请指导我。
PhonebookDatabaseEntities context = new PhonebookDatabaseEntities();
public bool Accunt(string username ,string password)
{
bool exists = context.Users.Where(u => u.UserName == username && u.Password == password);
return exists;
}
我得到错误不能隐式地将类型数据访问layer.user转换为布尔值。 –
使用公共用户Accunt(字符串用户名,字符串密码) –