More than one Dynamic columns to groupby linq
Hi All,May i know how to use dynamic column in group by linq
more than one dynamic column need to use in groupby
I got single dynamic column in groupby result, which working fine i.e shown below. But i need more than one dynamic column in groupby section
someAccounts.GroupBy(x => propertyValue.GetPropertyValue(x, requiredcolumns));
public static object GetPropertyValue(object obj, string propertyName)
{
return obj.GetType().GetProperty(propertyName).GetValue(obj, null);
}
Any one come accross, please guide
Thanks and Regards
Chellappan