Error using Select function

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: 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
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Eddy Nakamura
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: