i m making wcf service for login. my code for accesssing db data using linq is :
var result = from detail in dc.tbl_User_Masters where detail.User_Type_Id == 2
select new UserVerification
{
Uname = detail.User_Login_Name,
Password = detail.User_Pwd
};
where UserVerification is class which has Uname and Password properties stored..now how to check that variable that if they are null then we’ll not allow login…i dont know how to do that with linq..
You probably need to filter on the user/password you’re trying to authenticate:
Now
resultwill either benullor have the details for the authenticated user.