How run mongo command "rs.status" from c# driver
c#, mongodb, mongodb-.net-driver
Solution
I am not really familiar with C#, but you can use C#'s runCommand method, keeping in mind that rs.Status is a wrapper around replSetGetStatus database command. Which means you can run it with `db.runCommand({ replSetGetStatus: 1 })`
P.S. incorporating irmorteza's comment:
var database = mongoServer.GetDatabase("admin");
var res = database.RunCommand("replSetGetStatus");
Problem
I have a Replica Set, and i want to get rs.status() to analyze it. How can i run commands like `rs.status()` from C# driver ?