title: What providerName and connectionStrings should be used for MS SQL Compact Edition in MVC 4 in Visual Studio 2013 in ASP.NET MVC 4?
body: <p>What <code>providerName</code> should be used in <code>Web.config</code> file for MS SQL Compact Edition in MVC 4 in Visual Studio 2013?</p>
  
  <p><strong><h2>Introduction</h2></strong>
  When I use:</p>
  
  <pre><code> &lt;connectionStrings&gt;
      &lt;add name="MusicStoreEntities"
       connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf"
       providerName="System.Data.SqlServerCe.4.0"/&gt;
    &lt;/connectionStrings&gt; 
  </code></pre>
  
  <p>my website database works and <code>Genre</code> objects are retrieved from database and displayed</p>
  
  <p><img src="https://i.stack.imgur.com/eRZfr.jpg" alt="enter image description here"> </p>
  
  <p>after I change of <code>providerName</code> to <code>providerName="System.Data.SqlClient</code> like this:</p>
  
  <pre><code>   &lt;connectionStrings&gt;
          &lt;add name="MusicStoreEntities"
           connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf"
           providerName=providerName="System.Data.SqlClient"/&gt;
        &lt;/connectionStrings&gt; 
  </code></pre>
  
  <p>I get:</p>
  
  <p><img src="https://i.stack.imgur.com/Yk6nb.jpg" alt="enter image description here"></p>
  
  <h2>So WHY I want to change anything?</h2>
  
  <p><strong><h2>Actual problem:</h2></strong>
  If I leave <code>providerName="System.Data.SqlServerCe.4.0"</code> when I want to add new controller by this menu:</p>
  
  <p><img src="https://i.stack.imgur.com/G34BB.png" alt="enter image description here"></p>
  
  <p>I get:</p>
  
  <p><img src="https://i.stack.imgur.com/uJBLy.png" alt="enter image description here"></p>
  
  <p>but if I set <code>providerName="System.Data.SqlClient</code> the <code>StoreManagerController</code> is generated but the database does not work at all.</p>
  
  <p>Question: What should I do to generate <code>StoreManagerController</code>? I follow this tutorial: <a href="http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-5" rel="nofollow noreferrer">http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-5</a> and link to the working project just before that step it: <a href="http://www.speedyshare.com/RGdqH/MvcMusicStore.zip" rel="nofollow noreferrer">http://www.speedyshare.com/RGdqH/MvcMusicStore.zip</a></p>