Hi @Mohsin_Rizvi ,
Welcome to the MongoDB Community Forums! In order to use $select and $expand in your requests, you’ll need to use the MongoDB.AspNetCore.OData package. All you need to do after that is replace EnableQuery with MongoEnableQuery. The following resources might also help:
- Using ASP.NET Core OData with MongoDB Atlas - DEV Community
- OData using the MongoDB C# Driver
Hope that helps.
Thanks,
Rishit.