sultan
sultan

Reputation: 6058

Linq from TABLE select *

I need to select of all fields from a table I try to do this using to following code and I get the error notification class name is not valid at this point

from item in context.CreateQuery<permitdocumentfields>()
where item.Id == new Guid(Request["view"])
select new 
       { permitdocumentfields }

How to make this stuff to work like FROM TABLE SELECT *?

Upvotes: 3

Views: 4775

Answers (1)

Pranay Rana
Pranay Rana

Reputation: 176956

from item in context.CreateQuery<permitdocumentfields>()
where item.Id == new Guid(Request["view"])
select item 

Check the post for more detail : SQL to LINQ ( Visual Representation )

Simple select enter image description here

Select with the filter and select new enter image description here

Note : select new is require when you want to construct new object only.

Upvotes: 10

Related Questions