var detailGroups = headerGroup
.GroupBy(d => d.CompanyCode)
.Select(d => new { CompanCode = d. }); Thanks.
var detailGroups = headerGroup
.GroupBy(d => d.CompanyCode)
.Select(d => new { CompanCode = d. }); Thanks.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Feb 17, 2012, 11:23 AM
DanYeungPosted Feb 17, 2012, 10:36 AM
Thanks.
Jignesh TrivediPosted Feb 17, 2012, 1:51 AM
In your query select work only on "headerGroup" so when use group by the you get collection of "headerGroup" depend on companycode.
i.e.
.Select(d => d);
this query automatically convert your group by query.kindly provide more detail on same, means table structure and more..
hope this help.
DanYeungPosted Feb 17, 2012, 12:58 AM
Jignesh TrivediPosted Feb 16, 2012, 11:18 PM
try,
var detailGroups = (from t in headerGroup
group t by new
{
t.CompanyCode
}
into groupFiles
select new
{
groupFilesCompanyCode
});
hope this help.