Problem in calling Linq method which return group by result on page load
Hi,
I hv method in class file and i need to call it on page load...I just want to knw what shud be exact return type here...
public static void GetPaymentGroupBy()
{
DataClasses1DataContext obj = new DataClasses1DataContext();
var query = (from pay in obj.GetTable<Payplan_Installment>()
group pay.Frequency by
new
{
pay.InstallmentAmount,
pay.PaymentMode,
pay.PlanStatus
} into details
select details);
}
===
I m calling on page load like this:
dataGridView1.DataSource = DataClasses1DataContext.GetPaymentGroupBy();
please help me,it is very urgent
Thanks in advance