How to update a detached object with a collection inside on EF Core?
<p>I have a detached object which contains a collection. I'm attaching it using this code</p>

<pre><code>EntityEntry dbEntityEntry = _context.Entry&lt;T&gt;(entity);
dbEntityEntry.State = EntityState.Modified;
</code></pre>

<p>Detached object saves perfectly if I change most of the fields.. the issue is with a collection this object has. Changes on the collection are not persisted. I've seen the query executed and it onl touches the "main" table. All dependent relations are not updated</p>

<p>Is there any way to update the entire tree for a detached object?</p>