Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Architecture around mongodb with document and subdocument
- {
- ApplicationName: "FooApplication",
- Settings : [
- ConnectionString: "localhost@myserver.com",
- UserName: "Admin"
- Password: "Password"
- ]
- }
- }
- {
- ApplicationName: "BarApplication",
- Settings : [
- ConnectionString: "localhost@myserver.com",
- UserName: "Admin",
- Password: "Password",
- Special: "aaaaaaaaaaaaaa"
- ]
- }
- }
- public class ApplicationSettings {
- public ObjectId Id {get; set;}
- public string Name {get; set;}
- public Dictionary<string, string> Settings {get; set;}
- }
- var query = Query.EQ("_id", someIdHere);
- var update = Update.Set("Settings.ConnectionString", "NewLocalhost@myserver.com")
- collection.Update(query, update)
Add Comment
Please, Sign In to add comment