title: DDD: aggregate root question
body: <p>Let's say i got 2 entities - Foo and Bar. Foo is an aggregate root and contains Bar. As far as i understand, it should look like this:  </p>
  
  <pre><code>public class Foo{
      private readonly Bar Bar;
  }
  </code></pre>
  
  <p>I want to provide functionality for users to choose Bars for Foos from a defined list (and change it).</p>
  
  <p>If repositories are supposed to be for aggregate roots only it means that there will be no repository for Bar entity.  </p>
  
  <p>This leads to problem - Bar can't be created/updated independently without a reference to Foo.  </p>
  
  <p>Does that mean that Bar is supposed to have a repository despite that it has no meaning without a Foo?</p>