Guest User

Untitled

a guest
Dec 11th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. {
  2. "_id" : ObjectId("5a2bb526398b444facaba1c0"),
  3. "ProductId" : 1,
  4. "Combination" : {
  5. "Manufacturer" : "xxx",
  6. "Model" : "yyy",
  7. "Color" : "blue",
  8. "Thickness" : "9 mm"
  9. },
  10. "CreatedOn" : ISODate("2017-12-09T10:04:22.654Z"),
  11. "CreatedBy" : 0,
  12. "ModifiedOn" : Date(-62135596800000),
  13. "ModifiedBy" : 0,
  14. "ExcelId" : 10
  15. }
  16.  
  17. /* 2 */
  18. {
  19. "_id" : ObjectId("5a2bb526398b444facaba1c1"),
  20. "ProductId" : 1,
  21. "Combination" : {
  22. "Manufacturer" : "xxx",
  23. "Model" : "bbbb",
  24. "Color" : "green",
  25. "Thickness" : "9 mm"
  26. },
  27. "CreatedOn" : ISODate("2017-12-09T10:04:22.654Z"),
  28. "CreatedBy" : 0,
  29. "ModifiedOn" : Date(-62135596800000),
  30. "ModifiedBy" : 0,
  31. "ExcelId" : 10
  32. }
  33.  
  34. var combCol = db.GetCollection("zAttributeCombinations").AsQueryable<zAttributeCombinations>();
  35.  
  36. var variables = (from c in combCol
  37. where c.ProductId == ProductId **(&& Manufacturer = "xxx" && Model = "yyy" && Color="blue")**
  38. select new
  39. {
  40. Combination = c.Combination
  41. }).ToList();
Add Comment
Please, Sign In to add comment