Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-5018

Support nested paths within arrays in ExpressionFieldDefinition

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: LINQ3
    • None
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Example:

      class A { public int X { get; set; } }
      class B { public A[] A { get; set; } public int Y { get; set; } }
      class C { public B[] B { get; set; } }

       

      Support specifying "B.A.X" path by:

      var field = new ExpressionFieldDefinition<C>((C c) => c.B.Select(b => b.A.Select(a => 
      a.X))); 

      Note, the following expression is supported:

      coll.AsQueryable().Select(c => new {Xs = c.B.Select(b => b.A.Select(a => a.X))});

            Assignee:
            Unassigned Unassigned
            Reporter:
            boris.dogadov@mongodb.com Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: