Wondering Wondering - 1 year ago 57
C# Question

Lambda Expression of Select * from TableName

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
is name of the table.


Answer Source

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);