public Admin Login(string uid, string pwd)
{
try
{
using (dbcm = new DBContextManager())
{
Admin ad = dbcm.Admins.Single(a => a.Account.Equals(uid));
if (ad != null && ad.Password.Equals(pwd))//非空 && 密码匹配
return ad;
else
return new Admin { AdminId=-1 };
}
}
catch
{
return null;
}
}
函数式编程
繁花不似锦
拉风的咖菲猫
凤凰求蛊
德玛西亚99