<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Gideon Dsouza - visual-studio-2010</title><link>http://www.gideondsouza.com:80/Tags/visual-studio-2010</link><description>Gideon Dsouza - visual-studio-2010</description><item><title>Adding entity framework model for SQL Server Compact 4 Database in Visual Studio 2010</title><link>http://www.gideondsouza.com:80/blog/adding-entity-framework-model-for-sql-server-compact-4-database-in-visual-studio-2010</link><description>&lt;p&gt;This is yet another thing I forgot even though I’ve done it on a project before.&lt;/p&gt;

&lt;p&gt;I had a .edmx added for SQL CE4 DB, but when I went to “Update Model from Database” in Visual Studio I got :&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;an exception of type Microsoft.VSDesigner.Data.Local.ConnectionString ConverterException occurred&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After some &lt;a href="http://stackoverflow.com/questions/5645402/setup-ef4-data-source-for-sql-compact-4"&gt;research&lt;/a&gt; I re-learned, Visual Studio Service Pack 1 supports the creation of an EF model only for &lt;strong&gt;web projects&lt;/strong&gt;! My entity model in the project had not been created by Visual Studio but by &lt;a href="http://sqlcetoolbox.codeplex.com/"&gt;SQL Compact Toolbox.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So head over to install &lt;a href="http://sqlcetoolbox.codeplex.com/"&gt;SQL Compact Toolbox&lt;/a&gt; by the Great &lt;a href="http://erikej.blogspot.com/"&gt;ErikEJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.gideondsouza.com/Media/Default/BlogPost/blog/toolbx.png" alt="enter image description here"&gt;&lt;/p&gt;

&lt;p&gt;It supports EF models well enough AFAIK, to edit them from Visual Studio, however, if you make an update in the database, you’ll just need to delete your .edmx and recreate the model&lt;/p&gt;
</description><pubDate>Sun, 23 Oct 2011 09:07:27 GMT</pubDate><guid isPermaLink="true">http://www.gideondsouza.com:80/blog/adding-entity-framework-model-for-sql-server-compact-4-database-in-visual-studio-2010</guid></item><item><title>Adding relationships for SQL Compact 4</title><link>http://www.gideondsouza.com:80/blog/adding-relationships-for-sql-compact-4</link><description>&lt;p&gt;So the Visual Studio tooling for SQL Compact is a wee bit odd (In my opinion) because it took me way too long (two times in a row) to find out how I could edit relationships. &lt;/p&gt;

&lt;p&gt;If you right click a table, you should see &lt;em&gt;Table Properties&lt;/em&gt;. Click it, and it will open a window where you can manage relationships.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Server Explorer &gt; Database &gt; Tables &gt; Right Click your table &gt; Table Properties &gt; Manage Relations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then you should see this:
&lt;img src="http://www.gideondsouza.com/Media/Default/BlogPost/blog/manage relations[11].jpg" alt="Add Relationships"&gt;&lt;/p&gt;
</description><pubDate>Sat, 22 Oct 2011 05:37:12 GMT</pubDate><guid isPermaLink="true">http://www.gideondsouza.com:80/blog/adding-relationships-for-sql-compact-4</guid></item></channel></rss>