I want to enable LinQ query syntax over my classes. I think query syntax is translated to method syntax, for example:
var query = from p in new Class1
Your understanding is little incorrect, the following query :
var query = from p in new Class1()
where p.Id == "1000"
select p
will translate to :
var query = new Class1().Where(p => p.Id == "1000");
and when you are removing the where
part:
var query = from p in new Class1()
select p;
now it will be translated to something like:
var query = new Class1().Select(p=>p);