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

BsonSerializationException: Type Microsoft.OData.Edm.EdmModel is not configured as a type that is allowed to be serialized for this instance of ObjectSerializer.

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 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?

      Microsoft.AspNetCore.OData: 8.0.12
      MongoDB.Driver: 2.19.2
      MongoDB.Entities: 22.0.0

      I am using MongoDB to create Odata service.
      Here are my API and entity object

      The issue currently while using
      https://localhost:7119/odata/Supplier?select=Name
      select for mongo db collection. It is throwing an error for mongo db. I am not sure is a mongo db package issue or if something needs to configure for OData.
      BsonSerializationException: Type Microsoft.OData.Edm.EdmModel is not configured as a type that is allowed to be serialized for this instance of ObjectSerializer.

            Assignee:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Reporter:
            chikhaliyakashyap001@gmail.com Kashyap Chikhaliya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: