'And' operator in Linq
Posted
by Ani
on Stack Overflow
See other posts from Stack Overflow
or by Ani
Published on 2010-04-25T23:44:57Z
Indexed on
2010/04/25
23:53 UTC
Read the original article
Hit count: 344
I have a query that prints userid in label1 when username is entered.Works fine; but i want to write query for username and password that prints userid. so how can i write it? i tried writing using 'and' operator but dont seems to work.
int id = (from auser in lq.logins
where auser.username == userNameString //&& auser.Password =pwdString
select auser.userid).SingleOrDefault();
label1.Text = id.ToString();
Thanks Ani
© Stack Overflow or respective owner