tags:

views:

45

answers:

2

Hi,

I am very new in Linq, I want to select two coloum of table. so tell me how can i write query for that .

I want to fill dropdown list .

Thanks Manoj

+1  A: 
var query =from u in users
           select {u.Name,u.LastName}
Vinay Pandey
A: 

Usually its something like:

        using (var ctx = new EntityName())
        {
            var query = ctx.TableName.Select(o => new { o.Col1, o.Col2 });
        }
Jason Jong