求一 关于 List<CustomerTree> 的 Linq表达式
1. sql 语句
select fcustno, forderno, forderdate from t_orders
2. db 数据
fcustno forderno forderdate
1010 101002 2003/4/25
1010 101001 2003/4/25
1010 101002 2003/4/25
1020 102001 2003/4/25
1020 102002 2003/4/25
3.model 对象
public class CustomerTree
{
public string customerId { get; set; }
public List<orderInfo> orders { get; set; }
}
public class orderInfo
{
public string orderNo { get; set; }
public DateTime orderDate { get; set; }
}
4.期望 结果List<CustomerTree> trees 按照第1列分组 讲第2列第3列 放到orderInfo集合中
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货