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();
}
上記のクエリを、リストに保存されている顧客 ID のシーケンスで並べ替える方法は、顧客 ID による既定の並べ替え順序ではありません。