skip to Main Content

MongoDB not connecting while using host option?

I am unable to connect Atlas MongoDB while using --host option, But i'm able to connect while using --uri option where did i made a mistake? For example: --uri option It's working fine mongodump --uri="mongodb+srv://<username>:<password>@<hostname>/<dbname>" --gzip --out=/dir1/dir2 --host option getting…

VIEW QUESTION

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 {…

VIEW QUESTION
Back To Top
Search