public PrintCustomerAddress(PrintDocument doc, SEIKISHIRYOEntities context, ObservableCollection<PrintCustomerItem> customerForPrintPage)
{
this.context = context;
this.customerForPrintPage = customerForPrintPage;
printCustomerList = (from o in customerForPrintPage
select o).ToList();
li = (from o in customerForPrintPage
select o.CustomerID).ToList();
//List<int> orderLst=getCustomerID(li);
CustomerData = (from data in context.CustomerCompanyTables
where (from o in li select o).Contains(data.CustomerID)
orderby data.CompanyName ascending
select new CustomerCompanyTableMap
{
CompanyName = data.CompanyName,
CustomerID = data.CustomerID
}).ToList();
}
如何按存储在默认排序 orderby customerID 的列表中的 customerID 序列对上述查询进行排序。