title: How to resolve the class with properties?
body: <p>I have the line of code like this:</p>
  
  <pre><code>var clientProfile = new ClientProfile { Id = user.Id, UserName = userDto.UserName };
  </code></pre>
  
  <p>I'm trying to resolve this class using Autofac. How can I make this simply?
  Something like this:</p>
  
  <pre><code>var clientProfile = AutofacHostFactory
                      .Container
                      .ResolveWithProperty&lt;ClientProfile&gt;( 
                       Id = user.Id, UserName = userDto.UserName
                      );
  </code></pre>