title: RavenDB dynamic objects
body: <p>I have code that looks something like this:</p>
  
  <pre><code>using (var session = DocumentStore.OpenSession())
  {
      var dbItem = session.Load&lt;dynamic&gt;(item.Id);    
      if (dbItem is DynamicJsonObject)
      {
          dbItem["PropertyName"] = "new value";
      }
      session.SaveChanges();
  }
  </code></pre>
  
  <p>What I can't figure out is how to update properties of the dbItem.<br/>
  Does anyone know what to do?
  I have tried accessing the property name directly like this:
  dbItem.PropertyName
  I have also tried casting to ExpandoObject, IDictionary and more. But nothing seems to work.</p>