我有以下课程
public class SearchResponse
{
public string SearchTerm { get; set; }
public List<DataClass> lstDataClass
public string Category { get; set; }
}
public DataClass
{
public String Date { get; set; }
public string NoOfRecord { get; set; }
}
我将拥有List<SearchResponse>
并且我想通过对班级和班级进行分组来获得Searchterm
NoOfRecordSearchResponse
的Date
总和DataClass
认为
SearchResponse1
{
SearchTerm="A";
Category="cata";
ListOfDataClass
{
dataclass
{
5 may 2013,
50
}
dataclass
{
6 may 2013,
68
}
}
}
SearchResponse2
{
SearchTerm="A";
Category="catb";
ListOfDataClass
{
dataclass
{
5 may 2013,
52
}
dataclass
{
6 may 2013,
63
}
}
}
SearchResponse3
{
SearchTerm="B";
Category="catc";
ListOfDataClass
{
dataclass
{
5 may 2013,
48
}
dataclass
{
6 may 2013,
21
}
}
}
我想
SearchTerm="A", Date=5 May 2013, TotalRecords=102
SearchTerm="A", Date=6 May 2013, TotalRecords=131
SearchTerm="B", Date=6 May 2013, TotalRecords=48
.
.
.