the Membership Provider ValidateUser
using EF is quite simple
public override bool ValidateUser(string username, string password)
{
// Validate User Credentials
var r = db.ST_Users.FirstOrDefault(
x => x.Username.Equals(username) &&
x.Password.Equals(password));
return r != null ? true : false;
}
But this returns true
(finds and retrieves the hole object) no matter if I use balexandre
or BAleXanDre
.
How can I enable EF to compare in case-sensitive mode?
I know how to compare in case insensitive (using the StringComparison.CurrentCultureIgnoreCase
overload, but I just want the opposite)