title: How can I show the database name to my visitors in MVC4/Razor?
body: <p>I would like to inform my visitors of which database they are currently interacting with.  My application only has a single Entity Framework connection string in it's web.config.  The database name (initial catalog) is part of my connection string stored in my web.config.</p>
  
  <p>I can expose the ENTIRE connection string in the shared layout by including the following html. </p>
  
  <pre><code>You are connecting to &lt;span class="databasename"&gt;@System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionStringName"].ConnectionString)&lt;/span&gt;!
  </code></pre>
  
  <p>But I don't need the entire connection string only the database name. Is there a way to do this without involving a controller or instantiating a new SqlConnection()? Any suggestions? </p>