mongodb - why many methods marked as obsolete -
mongodb - why many methods marked as obsolete -
i wonder why many of c#-driver-methods (most user , collection-methods) marked obsolete. instead should utilize commanddocument dynamic bsondocuments.
i highly appreciate if there wrapper-classes in future within c#-driver.
one example.
if want create user have write code
var usercommand = new commanddocument { { "createuser", username }, { "pwd", securepassword.tostring() }, { "digestpassword", false }, { "roles", new bsonarray()} }; var result = _database.runcommand(usercommand);
instead of
_db.adduser(username, password);
of course of study can build own wrapper-classes know why classes obsolete. maybe can explain me. :)
thanks tobias
mongodb mongodb-csharp
Comments
Post a Comment