SHARE
TWEET

Untitled

a guest Oct 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT [o].[PartNumber], [o].[CreatedOn]
  2. FROM [Order].[OrderDetail] AS [o]
  3. INNER JOIN [Order].[OrderHeader] AS [o.OrderHeader] ON [o].[OrderHeaderID] = [o.OrderHeader].[OrderHeaderID]
  4. WHERE [o.OrderHeader].[WebUserID] = @__user_WebUserID_0
  5. ORDER BY [o].[PartNumber], [o].[CreatedOn]
  6.  
  7.  
  8. SELECT top 5 partnumber, o.createdon
  9. FROM [Order].[OrderHeader] AS [o]
  10. LEFT JOIN [Order].[OrderDetail] AS [o.OrderDetail] ON [o].[OrderHeaderID] = [o.OrderDetail].[OrderHeaderID]
  11. WHERE [o].[WebUserID] = 12
  12. Group By Partnumber, o.createdon
  13. order by o.createdon DESc
  14.  
  15.  var partNumbers2 = await _orderContext.OrderDetail
  16.                 .Where(o => o.OrderHeader.WebUserID == user.WebUserID)
  17.                 .Select(o => new OrderDetail { PartNumber = o.PartNumber, CreatedOn = o.CreatedOn })
  18.                 .GroupBy(o => new { o.PartNumber, o.CreatedOn })
  19.                 .OrderBy(o => o.Key.CreatedOn)
  20.                 .Take(8)
  21.                 .ToListAsync();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top