Created
December 20, 2019 05:25
-
-
Save AbhinavPradeep/c6f6f0065dac6ea73f281ae2bb5238f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void UpdateRename(IMongoCollection<Person> collection, int id,string field, string renamed) | |
{ | |
var update = Builders<Person>.Update.Set(field,renamed); | |
collection.UpdateOne(x => x._id == id,update); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment