Sayan Chatterjee

Sayan Chatterjee

  • NA
  • 22
  • 2.9k

LINQ query C#, ASP.NET

Aug 6 2017 10:33 AM
String check = Data.Logins.Where(Login=>Login.Username==TextBoxnewusername.Text)
 
I have a table named "Login".
There are 4 columns - Username, password, Name, Address.
The Username column is of data type nvarchar(max).
 
The 'TextBoxnewusername.Text' is a textbox where new users input their user name.
 
Now, the error is as follows-
 
Cannot implicitly convert type 'system.linq.IQueryable<Shop.Login>' to 'String'.
 
Any idea how to correct it?? Is there any casting it?

Answers (6)