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

Select with lambda parameter that is a base type of collection document type throws

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker - P1 Blocker - P1
    • None
    • 2.21.0
    • None
    • None

    Description

      Hi,

       

      using expression variables like below doesn't work with Linq V3

             Expression<Func<ParentBaseClass, ParentBaseClass>> select = x =>
      new ParentBaseClass()

      {     Id = x.Id, }

      ;

      collection.AsQueryable().Select(select).ToList();

       

      Best regards

      Dimitri

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            dimitri.kroo@baramundi.com Dimitri Kroo
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: