Can someone convert this code into linq?
SELECT PWDCOMPARE('1', Password) FROM dbo.Users WHERE Username = 'Admin'
I would like to authenticate the user using linq statement.
The user password are generated using sql pwdencrypt function
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you need to do is to wrap
PWDCOMPAREin a UDF on your database and then to call that UDF via yourDataContext.http://msdn.microsoft.com/en-us/library/bb399416.aspx
So run this on your database:
Then add it to your
DataContextin Visual Studio and call it like