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

Error using Select function

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.3
    • Component/s: Linq
    • Environment:
      Development environment: Windows 10, Visual Studio 2013 Update 5
      Production environment: Windows Server 2012 R2
    • Fully Compatible

      Attached we have a Model.cs with a basic example and a Service class where I centralized all my database connections and functions.

      In the Service class I'm trying to get less fields from my collection using "Select" function, supposing that my collection have three fields (as we can see in the Model.cs).

      When the code execute the lines between 20-24, we get the following error: "Additional information: Element 'Id' does not match any field or property of class MongoTestClass".

      But, if I remove the lines (20-24), we will get everything working fine.

            Assignee:
            Unassigned Unassigned
            Reporter:
            eddynaka Eddy Nakamura
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: