Reputation: 1863
Any one please tell me how to a write query for user is already exists or not in a table using linq to sql and Entity Framework?
Upvotes: 0
Views: 1268
Reputation: 34238
bool doesUserExist = myContext.Users.Any(u=>u.Username == "bob" && u.Password=="mypassword");
Upvotes: 3