I have a query where it should return TRUE or FALSE.
var query = from c in db.Emp
from d in db.EmpDetails
where c.ID == d.ID &&
If you really want to have a "true" or "false" String Response:
public string result
{
get
{
return db.Emp.SelectMany(c => db.EmpDetails, (c, d) => new {c, d})
.Where(@t => c.ID == y.ID && c.FirstName == "A" && c.LastName == "D")
.Select(@t => c)).Any().ToString();
}
}
But I would suggest to make the property "result" a bool and remove the ToString(). Once you have a bool you can always do a ToString() on it