<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Part 4: Models and Data Access</title><link>http://asp.net</link><pubDate>Thu, 01 Sep 2011 05:19:49 GMT</pubDate><generator>umbraco</generator><description>Comments for Part 4: Models and Data Access</description><language>en</language><atom:link href="http://asp.net/rss/comments/27628" rel="self" type="application/rss+xml" /><item><title>Comment Posted by testudo52</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Wed, 27 Apr 2011 12:44:20 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013001</guid><description><![CDATA[ <p>I received an error until I changed the connection string. Instead of</p><p>  &lt;connectionStrings&gt; </p><p>    &lt;add name=&quot;MovieDBContext&quot; </p><p>     connectionString=&quot;Data Source=|DataDirectory|MvcMusicStore.sdf&quot; </p><p>     providerName=&quot;System.Data.SqlServerCe.4.0&quot;/&gt; </p><p>  &lt;/connectionStrings&gt;   </p><p></p><p>I used</p><p>  &lt;connectionStrings&gt; </p><p>    &lt;add name=&quot;MusicStoreEntities&quot; </p><p>     connectionString=&quot;Data Source=|DataDirectory|MvcMusicStore.sdf&quot; </p><p>     providerName=&quot;System.Data.SqlServerCe.4.0&quot;/&gt; </p><p>  &lt;/connectionStrings&gt;   </p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/testudo52.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sobinscott</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Fri, 29 Apr 2011 14:27:57 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013029</guid><description><![CDATA[ <p>Why do you change the code frquently?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/sobinscott.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Tim.Yamkuza</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Wed, 04 May 2011 16:44:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013069</guid><description><![CDATA[ <p>I finished the step, &quot;Updating the Store Index to query the database&quot; and ran my project.  When I click the Store link it bombs on, &quot; var genres = storeDB.Genres.ToList();&quot; telling me that it is, &quot;Unable to fine the requested .Net Framework Data Provider&quot;.  How do I fix this?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Tim.Yamkuza.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Tim.Yamkuza</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 05 May 2011 08:37:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013076</guid><description><![CDATA[ <p>Never mind, it was my own failure to follow directions (I didn&#39;t install SQL Server CE).</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Tim.Yamkuza.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by michaelhou</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 09 May 2011 05:36:27 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013103</guid><description><![CDATA[ <p>to Tim.Yamkuza:how to solve the problem.I meet the same error with you .</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/michaelhou.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Tim.Yamkuza</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 09 May 2011 11:21:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013109</guid><description><![CDATA[ <p>The problem I had was I missed this part of the set up (see Part 1, Installing the software):</p><p></p><p>&quot;We’ll be using the SQL Server Compact (also free) to host the database. Before you start, make sure you&#39;ve installed the prerequisites listed below. You can install all of them using the following Web Platform Installer link: <a rel="nofollow" href="http://www.microsoft.com/web/gallery/install.aspx?appid=VWD2010SP1Pack" target="_blank">www.microsoft.com/</a></p><p></p><p>&quot;</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Tim.Yamkuza.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by benfulton</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Sat, 14 May 2011 20:27:33 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013167</guid><description><![CDATA[ <p>Took me a while to figure out that you have to select the project in Solution Explorer before the folders under &quot;Add ASP.NET Folder&quot; become enabled.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/benfulton.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by RonaldDiract</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 30 May 2011 14:40:15 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013326</guid><description><![CDATA[ <p>I cannot find the sample data in the Zip-file. Someone ideas?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/RonaldDiract.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by RonaldDiract</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 30 May 2011 15:06:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013327</guid><description><![CDATA[ <p>Never mind, found it on the web. Great tutorials BTW!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/RonaldDiract.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by deldridg</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 30 May 2011 19:45:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013328</guid><description><![CDATA[ <p>Great tutorial - many thanks!</p><p></p><p>One little thing - in the MusicStoreEntities.cs class, I don&#39;t recall adding a DBSet for the Artists model, yet after running the app, it&#39;s magically appeared under the DBSet entries for Albums and Genres.</p><p></p><p>Have I missed something?  Note, the tutorial (see &quot;Adding a Context Class&quot;) doesn&#39;t say to add the line: [ public DBSet&lt;Artist&gt; Artists { get; set; } ] yet it now exists!</p><p></p><p>It would be nice to understand the EF implications of this if there are any!</p><p></p><p>Many thanks,</p><p>Dave (Sydney, Aust)</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/deldridg.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by darkrider23</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 02 Jun 2011 10:22:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013367</guid><description><![CDATA[ <p>great tutorial but restrictive - must use a particular db, must use EF 4.1 - this isn&#39;t very practical in the real world. I understand MS wants to introduce us to its new tools but its also not as helpful</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/darkrider23.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by lisabaker3494</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 02 Jun 2011 13:07:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013369</guid><description><![CDATA[ <p>i had to change the connection string from MvcMusicStore.sdf to MvcMusticStore.mdf ...</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/lisabaker3494.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bpatin</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 02 Jun 2011 15:29:17 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013371</guid><description><![CDATA[ <p>Try to add a boolean field in your model and save it to the database.  Since SQL Server has no bool datatype, you must use an int, but that won&#39;t work.  I&#39;ve seen example wrappers using MVC 2, but the technique won&#39;t work in MVC 3, because the data annotations are different, and I see no equivalent.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/bpatin.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by SledGimp</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 09 Jun 2011 17:25:07 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013469</guid><description><![CDATA[ <p>I also finished the step, &quot;Updating the Store Index to query the database&quot; and ran my project. When I click the Store link it bombs on, &quot; var genres = storeDB.Genres.ToList();&quot; telling me that it is, &quot;Unable to fine the requested .Net Framework Data Provider&quot;. My problem is that I have SQL Enterprise 2008 installed not compact, how do I get around this?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/SledGimp.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by stevek123</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Fri, 17 Jun 2011 18:41:09 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013550</guid><description><![CDATA[ <p>An answer to SledGimp&#39;s question would be appreaciated.  I have a similar issue.  Heading over to Google to look for an answer.  </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/stevek123.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by stevek123</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Fri, 17 Jun 2011 18:51:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013551</guid><description><![CDATA[ <p>To address SledGimp&#39;s (and my) problem: I changed the &lt;connectionStrings&gt; value to this and it seemed to work</p><p></p><p>&lt;connectionStrings&gt;</p><p> &lt;add name=&quot;MusicStoreEntities&quot; connectionString=&quot;Data Source=.;Initial Catalog=MvcMusicStore.sdf;Integrated Security=True&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;</p><p>&lt;/connectionStrings&gt;</p><p></p><p>I don&#39;t know if it is correct, but the expected page comes up. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/stevek123.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jasmine_j</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Sun, 19 Jun 2011 01:40:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013556</guid><description><![CDATA[ <p>Please help, I am stuck at adding the App_Data directory.</p><p></p><p>When I try to add the App_Data directory (From Project -&gt; Add ASP.NET Folder -&gt; App_Data) all the items are disabled (App_GlobalResources, App_LocalResources, App_Data, App_Browsers, Theme), any ideas? thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jasmine_j.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by erwanage</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Wed, 29 Jun 2011 04:46:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013636</guid><description><![CDATA[ <p>I created a premade internet application with ASP.NET MV3 using visual studio 2010.</p><p>I want to manage an user database but my table is created in aspnetdb.mdf.</p><p>I&#39;d like to konw if it&#39;s possible to create a context class linked to the aspnet_membership table.</p><p></p><p>regards</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/erwanage.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by demonotter</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 30 Jun 2011 07:03:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013644</guid><description><![CDATA[ <p>Hey,</p><p>I have a problem with a connection string on MS SQL Server 2008 Express</p><p>&lt;connectionStrings&gt;</p><p>    &lt;add name=&quot;MusicStoreEntities&quot;</p><p>     connectionString=&quot;Server=.\sqlexpress; Database=MvcMusicStore; User Id=id;password=pass&quot;</p><p>     providerName=&quot;System.Data.SqlClient&quot; /&gt;</p><p>  &lt;/connectionStrings&gt;  </p><p>This connection string works when I put it into a complete project</p><p>But when I&#39;m trying to use it on the current step, I have an Error:Login failed for user</p><p></p><p>Help me with it please, spent three hours solving this problem(</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/demonotter.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by frogjezz</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Mon, 04 Jul 2011 13:40:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013681</guid><description><![CDATA[ <p>I think I followed the tutorial exactly, but I have this error when trying to update the store index to query the database:</p><p></p><p>Error point on this line --&gt; var genres = storeDB.Genres.ToList();</p><p></p><p>-----</p><p>One or more validation errors were detected during model generation:</p><p></p><p>	System.Data.Edm.EdmEntityType: : EntityType &#39;Album&#39; has no key defined. Define the key for this EntityType.</p><p>	System.Data.Edm.EdmEntitySet: EntityType: EntitySet �Albums� is based on type �Album� that has no keys defined.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/frogjezz.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tjvader</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 18 Aug 2011 09:17:19 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013981</guid><description><![CDATA[ <p>I have the same problem with the following StoreController --&gt; var genres = storeDB.Genres.ToList();. I currently have two versions of SS CE install, v3.5 and v4.0. The v3.5 is from SQL Server 2005 CE and the SQL Server CE4.0 I downloaded from MS. I am using my Win 7 64bit machine.</p><p></p><p>TomJ</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tjvader.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mr Eugene</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 18 Aug 2011 15:37:10 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013986</guid><description><![CDATA[ <p>Nice tutorial. I would like to ask a simple question: how can I use other databases (for e.g. SQL Server 2005)?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/mr%20Eugene.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ematsuno</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 18 Aug 2011 17:23:54 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013988</guid><description><![CDATA[ <p>So, I can&#39;t find the VS 2008 version.  Anyone?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ematsuno.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tjvader</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Sun, 21 Aug 2011 03:10:16 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013999</guid><description><![CDATA[ <p>I did a little bit more snoopying and found that this tutorial works as expected ON-THE-32BIT side of Win 7. All of my problems exist on the 64bit side of the OS. :-(</p><p></p><p>TomJ</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tjvader.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Scott.Mermelstein</title><link>http://asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4</link><pubDate>Thu, 01 Sep 2011 05:19:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014098</guid><description><![CDATA[ <p>Is there any particular reason that Genre in this example is marked as a partial class?  I removed the partial in my code, and it seemed to behave as expected, but wasn&#39;t sure if EF requires it.  If so, why does it require it only for that class, and no other?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/Scott.Mermelstein.jpg?forceidenticon=false&amp;dt=635049225000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>