title: UnityContainer.Resolve or ServiceLocator.GetInstance?
body: <p>It could seem a stupid question because in my code everything is working, but I've registered a singleton this way with my Unity container <code>_ambientContainer</code>:</p>
  
  <pre><code> _ambientContainer.RegisterType&lt;Application.StateContext&gt;(new ContainerControlledLifetimeManager());
  </code></pre>
  
  <p>In order to avoid to use my local field, I use:</p>
  
  <pre><code>get {
      return ServiceLocator.Current.GetInstance&lt;Application.StateContext&gt;();
  }
  </code></pre>
  
  <p>inside my get property to get an instance of my object.
  This way I get always the same instance (<code>Application.StateContext</code> is still a singleton) or does <code>GetInstance</code> create a new one?</p>
  
  <p>Is it better to use the local <code>_ambientContainer</code> field instead?</p>
  
  <pre><code>get {
      return _ambientContainer.Resolve&lt;Application.StateContext&gt;();
  }
  </code></pre>
  
  <p>Thank you.</p>