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 &&
You can use .Any() or .Count(). Any() is performing better. (Check this SO question to see why)
.Any()
var query = from c in db.Emp
from d in db.EmpDetails
where c.ID == d.ID && c.FirstName == "A" && c.LastName == "D"
// It should return TRUE when this above statement matches all these conditions
this.result = query.Any().ToString()
.Count()
var query = from c in db.Emp
from d in db.EmpDetails
where c.ID == d.ID && c.FirstName == "A" && c.LastName == "D"
// It should return TRUE when this above statement matches all these conditions
this.result = (query.Count() > 0).ToString()