Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
此代码使用身份验证人登录,我的问题是密码,例如,如果
pass=AAaa,我们在系统中输入aaaa登录,搜索时区分大小写怎么办?
Inspector inspector = context.Inspectors.Where(i => i.InspectorUserName == userName && i.InspectorPssWord == passWord).FirstOrDefault();
谢谢
Linq(以及 C#)已经做了区分大小写的检查,所以你不必修改你的代码来包含它。
不过,另一方面,您应该真正散列这些密码:)