I have the following queries which are returning a Object reference not set to an instance of an object error:
(From u In db.Customers Where u.CustomerEmail Like UserName.Text Select u.CustomerEmail).ToString
(From u In db.Customers Where u.CustomerEmail Like UserName.Text Select u).Single
If I do a sql select with the same values I get the required data:
(select CustomerEmail from dbo.Customers where dbo.CustomerEmail like @UserName)
Please can you point out where I am going wrong with the syntax.
Thanks.