N
.nLL
Hi, i've got below query
--------------------------
TopCountriesRepeater.DataSource = ds.Tables[1].AsEnumerable()
.GroupBy(row => row.Field<string>("CountryCode"))
.Select(group => new { CountryCode = group.Key, CountryName
= group.Key, UsersFromIp = group.Sum(row =>
row.Field<int>("UsersFromIp")) })
.OrderByDescending(g => g.UsersFromIp);
-----------------------
What i want to do is instead of
CountryName = group.Key
I want to select "CountryName" column of the row when executing query.
Can someone give me heads up for this?
Thanks
--------------------------
TopCountriesRepeater.DataSource = ds.Tables[1].AsEnumerable()
.GroupBy(row => row.Field<string>("CountryCode"))
.Select(group => new { CountryCode = group.Key, CountryName
= group.Key, UsersFromIp = group.Sum(row =>
row.Field<int>("UsersFromIp")) })
.OrderByDescending(g => g.UsersFromIp);
-----------------------
What i want to do is instead of
CountryName = group.Key
I want to select "CountryName" column of the row when executing query.
Can someone give me heads up for this?
Thanks