How to get ObjectId instead of Timestamp and other information in a List field when querying MongoDB with ASP.NET Core Web API?
My mongodb user collection is of following schema: { _id: ObjectId("6420eb68cd0df40a33b0ead7"), FirstName: 'Ashutosh', LastName: 'Garg', Email: '[email protected]', Password: 'password', Role: 'Tenant', Properties: [ ObjectId("6420eeb8cd0df40a33b0eadb") ] } My User.cs is: using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Driver; using System.Text.Json.Serialization; namespace webapi.Models {…