I'm using ADO.NET EF 3.5. I need to do a case-sensitive search (on a password field):
using (UserEntities context = new UserEntities(strCon))
{
PortalUser pu;
pu = (
from u in context.PortalUser
where
u.UserName == userName && u.InitialPassword == pwd
//where u.UserName == userName && u.InitialPassword.Equals(pwd, StringComparison.CurrentCulture)
select u).FirstOrDefault();
}
I tryied both "==" and "Equals", but the search is always case-insensitive. Can anyone help me?
Thanks,
Sheng