获取密码linq到sql [英] getting password linq to sql
本文介绍了获取密码linq到sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
全部。我想获得所有用户的信息。我可以获得除密码之外的所有信息。请帮我。这是我的代码......
密码类型是byte []
hi , all. i want to get all user's information. i can get all information besides password. please help me. here is my code...
password type is byte[]
public static Dictionary<string, string> GetUserInfo(int _ID)
{
try
{
using (var db = new MiniFootballEntities())
{
var stringID = _ID.ToString();
var data = db.Users.First(p => p.ID == _ID);
Dictionary<string, string> dictGetUserInfo = new Dictionary<string, string>();
dictGetUserInfo.Add("FirstName", data.FirstName);
dictGetUserInfo.Add("LastName", data.LastName);
dictGetUserInfo.Add("Username", data.Username);
dictGetUserInfo.Add("Password", data.Password);
dictGetUserInfo.Add("Email", data.Email);
dictGetUserInfo.Add("Role", data.Role.ToString());
dictGetUserInfo.Add("PassportNumber", data.PassportNumber);
dictGetUserInfo.Add("Phone", data.Phone);
dictGetUserInfo.Add("Blocked", data.Blocked.ToString());
dictGetUserInfo.Add("WrongLoginCount", data.WrongLoginCount.ToString());
dictGetUserInfo.Add("Description", data.Description);
return dictGetUserInfo;
}
}
catch (Exception err)
{
throw;
}
}
推荐答案
登录信息存储在哪里?我们在谈论一些第三方帐户数据库吗?活动目录?其他一些LDAP?你自己创造的数据库??什么?
如果帐户数据库在安全性方面是值得的,它将永远不会向您公开密码数据。
Where is the login information stored? Are we talking about some 3rd party account database? Active Directory? Some other LDAP? A database of your own creation?? What?
If the account database is worth anything as far as security, it will NEVER expose the password data to you.
这篇关于获取密码linq到sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文