Updating documents in RavenDB

henningc picture henningc · Jun 25, 2010 · Viewed 10k times · Source

If you add, delete or rename a property on a persisted entity, what's the easiest way to update the documents in RavenDB?

Answer

user156888 picture user156888 · Jul 7, 2011

raven also has object tracking. so the following works:

var doc = _session.Load<MyDocType>(docId);
doc.PropertyToChange = "New Value";
_session.SaveChanges();