problem about northwind-Collection of common programming errors


  • Femaref
    c# linq linq-to-sql northwind
    The following code is generating a runtime error and I have no idea why.from o in Orders group o by o.Employee into employeeOrders select new {employeeOrders.Key.EmployeeID,employeeOrders.Key.FirstName,Orders = from eord in employeeOrdersorderby eord.OrderIDselect new {eord.OrderID,eord.OrderDate,OrderTotal=eord.OrderDetails.Sum (od => od.UnitPrice)} }The error is Member access ‘System.Decimal UnitPrice’ of ‘LINQPad.User.OrderDetails’ not legal on type ‘LINQPad.User.OrdersI’ve also tried this

Web site is in building