title: Ninject/.NET MVC3 - Scope?
body: <p>I'm a beginner with both .NET MVC and Ninject.</p>
  
  <p>Here how I get my Ninject kernel:
  using Ninject;</p>
  
  <pre><code>public class NinjectKernel
  {
      private static IKernel _Instance = new StandardKernel();
  
      public static IKernel getInstance()
      {
              return _Instance;
      }
  }
  </code></pre>
  
  <p>Here's how I save an instance of an object I want to re-use:</p>
  
  <pre><code>(...) NK = NinjectKernel.getInstance();
  private Game getGameInstance() {
      IGame iGame;
      try
      {
          iGame = NK.Get&lt;IGame&gt;(DefaultGameName);
      }
      catch
      {
          NK.Bind&lt;IGame&gt;().To&lt;Game&gt;().InSingletonScope().Named(DefaultGameName)
              .WithConstructorArgument("ColorChoiceCount", 12)
              .WithConstructorArgument("CodeLength", 6)
              .WithConstructorArgument("TurnsToBePlayed", 8)
              .WithConstructorArgument("DoubleColorAllowed", true)
              ;
          iGame = NK.Get&lt;IGame&gt;(DefaultGameName);
      }
      return (Game)iGame;
  }
  </code></pre>
  
  <p>I want the Game object to be re-usable within a use "session", which means that if he leaves the site this instance won't be used again. But in the current situation, while debugging, when I close the application and re-launch it, I always re-get the instance of my previous "session".
  I would also like to know if I won't get the same instance for multiple users because I don't want this. (users may be or may not be authentified, right now they aren't at all).</p>
  
  <p>(You may also suggest my a better solution than using a try/catch there, because I'm sure there must be one, but as this works it is not a priority for now.)</p>
  
  <p>Thank you for your help.</p>