Iam trying to insert object to mongodb and I didnt find how. In my way the object inserted gets the id 00000
Here is my code:
public static async Task InsertData<T>(string collection_name, object insertData)
DB mongoConnection = new DBconnection();
var collection = mongoConnection._database.GetCollection<object>(collection_name);
await collection.InsertOneAsync(insertData)
}