LINQ to SQL selecting fields
Posted
by
user3686904
on Stack Overflow
See other posts from Stack Overflow
or by user3686904
Published on 2014-05-29T09:16:32Z
Indexed on
2014/05/29
9:25 UTC
Read the original article
Hit count: 130
I am trying to populate more columns in the query below, could someone assist me?
QUERY:
var query = from r in SQLresults.AsEnumerable()
group r by r.Field<string>("COLUMN_ONE") into groupedTable
select new
{
c1 = groupedTable.Key,
c2 = groupedTable.Sum(s => s.Field<decimal>("COLUMN_TWO")),
};
How could I get a column named COLUMN_THREE
in this query ?
Thanks in advance
© Stack Overflow or respective owner