Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems my issue is that Controller creation doesn't work with SQLCE 4.0 connectionStrings so using a conectionString of provider of System.Data.SqlClient handled that issue. </p> <p>The next problem I had was that connectionString values (such as encryption) were not respected through this means so I now have 2 different constructors to get around this bug.</p> <pre><code>#if DEBUG public Context() : base("name=DefaultConnection") { ; } #else /// &lt;summary&gt; /// Default Constructor /// &lt;/summary&gt; public Context() : base("name=CompactConnection") { ; } #endif </code></pre> <p>Here's my configuration:</p> <pre><code>&lt;entityFramework&gt; &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework"&gt; &lt;parameters&gt; &lt;parameter value="System.Data.SqlServerCe.4.0" /&gt; &lt;/parameters&gt; &lt;/defaultConnectionFactory&gt; &lt;/entityFramework&gt; &lt;connectionStrings&gt; &lt;add name="CompactConnection" providerName="System.Data.SqlServerCe.4.0" connectionString="Data Source=&amp;quot;|DataDirectory|\DB.sdf&amp;quot;;encryption mode=platform default;password=&amp;quot;P4$$w0rd!&amp;quot;"/&gt; &lt;add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-MsSqlCe-20121028004432;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-MsSqlCe-20121028004432.mdf" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>Of course, this is just a workaround for a deeper issue. If anyone else knows of the root cause of this issue, I'd love to know.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload