Hi All,
I just want to know what's the lambda expression of Select * from TableName
.
Like in plain LINQ it will be var res=from s in db.StudentDatas select s
;
here StudentData
is name of the table.
Thanks.
Hi All,
I just want to know what's the lambda expression of Select * from TableName
.
Like in plain LINQ it will be var res=from s in db.StudentDatas select s
;
here StudentData
is name of the table.
Thanks.
You don't require a lambda expression. You just want all members of the collection.
The compiler will translate it to something along these lines:
db.StudentDatas.Select(s => s)
The translation to SQL is done by the Base Class Library. SQL, of course, does not use lambda expressions...
The lambda expression isn't needed:
var res = db.StudentDatas;
You could use one but it would be rather pointless:
var res = db.StudentDatas.Select(s => s);