title: How to connect an ORM to the IoC container?
body: <p>been searching a lot information about IoC/DI development, but I haven't found much information how to integrate an ORM into the IoC/DI development.</p>
  
  <ol>
  <li>Should the IoC know about the ORM? Or vice versa?</li>
  <li>How does the IoC configuration mapping work when mapping a "ORM type"?</li>
  </ol>
  
  <p>Example:</p>
  
  <pre><code>public class Person : IPerson
  {
      private IPersonModel _model;
  
      public Person(IPersonModel model)
      {
          _model = model;
      }
  }    
  
  IoC.Register&lt;IPerson&gt;.As&lt;Person&gt;();    
  IPerson = IoC.Resolve&lt;IPerson&gt;();   
  </code></pre>
  
  <p>How does the IoC/ORM work here, IPersonModel can be any person in my 
  data base (or other data store) ?</p>
  
  <p>I feel there must a method or such like this:</p>
  
  <pre><code>IPerson = IcO.Resolve&lt;IPerson&gt;(() =&gt; PersonId = 50);
  </code></pre>
  
  <p>Anyone want to explain more general how to integrate IoC with an ORM?</p>