[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. Created: 08/Jun/23  Updated: 04/Aug/23

Status: Backlog
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kashyap Chikhaliya Assignee: Oleksandr Poliakov
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-3989 oDATA $select support with LINQ3 Closed
Quarter: FY24Q2
Documentation Changes Summary:

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?


 Description   

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.



 Comments   
Comment by PM Bot [ 08/Jun/23 ]

Hi chikhaliyakashyap001@gmail.com, thank you for reporting this issue! The team will look into it and get back to you soon.

Generated at Wed Feb 07 21:48:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.