<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>Accessing your Model's Data from a Controller</title><link>http://asp.net</link><pubDate>Thu, 12 May 2011 14:22:53 GMT</pubDate><generator>umbraco</generator><description>Comments for Accessing your Model's Data from a Controller</description><language>en</language><atom:link href="http://asp.net/rss/comments/27653" rel="self" type="application/rss+xml" /><item><title>Comment Posted by rema43001</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 14 Apr 2011 19:03:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012810</guid><description><![CDATA[ <p>In Right-click the Controllers folder and create a new MoviesController controller. Don&#39;t appear the options:</p><p>•Controller name •Template •Model class •Data context class •Views </p><p>Only appear the options:</p><p>•Controller name and a checkbox (Add action methods for Create, Update, Delete, and Details scenarios)</p><p></p><p>Someone can help me?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/rema43001.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by xenomatic</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 14 Apr 2011 20:44:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012812</guid><description><![CDATA[ <p>@rema43001 - They updated the tutorial after applying the MVC3 Tools Update.  You will see the more elaborate Add Controller window after you apply the update to your system.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/xenomatic.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by xenomatic</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 14 Apr 2011 20:47:57 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012813</guid><description><![CDATA[ <p>BTW, you can get to the update here: <a rel="nofollow" href="http://www.microsoft.com/web/gallery/install.aspx?appsxml=&amp;appid=MVC3" target="_blank">www.microsoft.com/</a></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/xenomatic.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by rema43001</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 15 Apr 2011 19:34:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012830</guid><description><![CDATA[ <p>Thank you xenomatic, now I can see the more elaborate Add Controller, but when I click Add I receive this error:</p><p></p><p>Could not load file or assembly &#39;file:///C:\Users\fiss\documents\visual studio 2010\Projects\MvcMovie\MvcMovie\bin\EntityFramework.dll&#39; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)</p><p></p><p>Can you help me?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/rema43001.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by andre.vermeulen</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Sat, 16 Apr 2011 07:56:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012835</guid><description><![CDATA[ <p>I am trying to use MVC3 with the Entity framework with Code First, but the code Template generation process in MS Visual Web Developer 2010 - is not detecting my Model in the models folder - giving a message - &quot;No Model classes are available&quot; - although I do have model classes for which I want to create controllers.</p><p></p><p>The templating option I&#39;ve selected is &quot;Controller with read/write actions and views using the Entity Framework&quot;.</p><p></p><p>I&#39;ve uninstalled and reinstalled Web Developer 2010, but still having the same error.</p><p></p><p>Anyone know how I can get around this error?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/andre.vermeulen.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Sat, 16 Apr 2011 16:08:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012839</guid><description><![CDATA[ <p>rema43001: The easiest thing is to create a new project. Alternatively, you can create a new dummy project and copy the EntityFramework.dll to your old project. The problem is you created your project before you installed the ASP.NET MVC 3 tools update.</p><p>andre.vermeulen: VWD  &quot;No Model classes are available&quot;. </p><p>Make sure you have VWD/SP1 installed. Create a new dummy internet project. In the home controller, right click About and add a strongly typed view. You should see three models ChangePasswordModel, LogOnModel and RegisterModel. Are your models public?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by rema43001</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Mon, 18 Apr 2011 18:58:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012858</guid><description><![CDATA[ <p>I create a new project and now all is fine, thanks ricka6!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/rema43001.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by saurabhj</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Wed, 20 Apr 2011 03:59:18 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012878</guid><description><![CDATA[ <p>I was majorly stuck at this section: Accessing your Model&#39;s Data from a Controller</p><p></p><p>Kept getting an error that Visual Studio was unable to retrieve the Meta Data for the Movie.Model</p><p></p><p>What I ended up doing was using SQLExpress instead of SQL Server Compact as mentioned in the tutorial with the same database that Asp.Net uses to save the authentication.</p><p></p><p>Put this in your connection strings instead of what was mentioned in the previous step.</p><p></p><p>    &lt;add name=&quot;MovieDBContext&quot;</p><p>     connectionString=&quot;data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true&quot;</p><p>     providerName=&quot;System.Data.SqlClient&quot; /&gt;</p><p></p><p>Hope this helps someone stuck. (I think you need SP1 to use the Compact DB - not sure though)</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/saurabhj.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by M4rw</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Wed, 20 Apr 2011 04:38:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012881</guid><description><![CDATA[ <p>Hi, I followed all the steps up till testing the create function. It works, but I can&#39;t enter &#39;9.99&#39; as price. It says &#39;The value &#39;9.99&#39; is not valid for Price.&#39; But in Movie.cs I have like in the tutorial:</p><p></p><p>public decimal Price { get; set; }</p><p></p><p>I can however enter e.g. &#39;10&#39;, then it&#39;s stored as &#39;10,00&#39;. When I edit the entry, change nothing and want to save, it says again that &#39;10.00&#39; is not a valid value, but when I save it as &#39;10&#39; it&#39;s back at &#39;10.00&#39; :O What&#39;s happening here?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/M4rw.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by M4rw</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Wed, 20 Apr 2011 05:18:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012883</guid><description><![CDATA[ <p>Nevermind, it was my browser. The error occured in Firefox, but not in Opera :/</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/M4rw.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gorayah</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 21 Apr 2011 06:08:50 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012911</guid><description><![CDATA[ <p>Hi</p><p>I am trying to create a controller based on information provider above and using existing database SQL Server 2005, but I everytime I m getting following error:</p><p>Unable to retrieve metadata for &#39;ApplicationName&#39;. The provider did not return a ProviderManifestToken string.</p><p></p><p>Someone please help regarding this?</p><p></p><p>Cheers.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/gorayah.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ashu_123</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 21 Apr 2011 10:03:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012916</guid><description><![CDATA[ <p>Not able to see movies.sdf file, even after show all files and refresh.</p><p>Though all the things working fine.</p><p>I am not able to find movies.sdf file, by windows explorer(on my location) too. </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/ashu_123.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by joey dog</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 22 Apr 2011 10:48:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012934</guid><description><![CDATA[ <p>I installed the Tools Update but when I click Add for MovieController I get this MVS warning: &quot;Unable to retrieve metadata for &#39;MvcMovie.Models.Movie&#39;. Unable to find the requested .Net Framework Data Provider. It may not be installed.&quot;</p><p>What else do I need and where do I get it?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/joey%20dog.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by happycamper01</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Mon, 25 Apr 2011 16:19:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012964</guid><description><![CDATA[ <p>I experienced same issue as ashu 123.  The app works fine, but I cannot find my Movies.sdf file anywhere. It&#39;s definitely not in the App_Data folder, and a search for the filename returns no results.  Any ideas?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/happycamper01.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by hulyapoyraz</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Tue, 26 Apr 2011 08:56:44 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012980</guid><description><![CDATA[ <p>I created a project Visual Studio 2010 Ultimate and used SqL Server 2008 Express instead of Sql Server Compact.All the things works fine. Also Movies db created in Sql.</p><p>    &lt;add name=&quot;MovieDBContext&quot;</p><p>    connectionString=&quot;data source=.\SQLEXPRESS;Integrated Security=SSPI;database=Movies;User ID=sa;password=&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/hulyapoyraz.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by eyalb</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Tue, 26 Apr 2011 11:28:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012982</guid><description><![CDATA[ <p>i use sql server 2008 and get: </p><p>System.Data.SqlClient.SqlException: Invalid object name &#39;dbo.Movies&#39;.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/eyalb.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 29 Apr 2011 14:28:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013030</guid><description><![CDATA[ <p>gorayah : eyalb :  and other using SQL Server/SQL Express. Please use SQL Compact for this tutorial. Using SQL Express and SQL Server adds more complexity in dropping the DB. Once your DB gels so you won&#39;t be changing the schema it&#39;s easy to export the data to a full blown SQL Server. There is really no good reason to use SQL Express of SQL CE.</p><p></p><p>ashu_123 : happycamper01 : cannot find my Movies.sdf </p><p> make sure you  connection string in the root web.config, not the one under views, which is easy to get by mistake. Also, use the exact connection string provided or the SDF will be in a system directory</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by cla</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Tue, 03 May 2011 08:14:52 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013052</guid><description><![CDATA[ <p>it accept only key named &quot;ID&quot;? if I don&#39;t rename the key in the db (sorry, but I&#39;m another user-SQL server express), when try to create controller in another project, it dosn&#39;t work </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/cla.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by cla</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Tue, 03 May 2011 08:51:52 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013055</guid><description><![CDATA[ <p>add: instead name Movie and Movies, I try to use Anagrafica and Anagrafiche (in italian)...</p><p>it dosn&#39;t work... only using Anagrafica and Anagraficas &lt;- with ending &quot;s&quot;... my error or big bug?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/cla.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sammie786</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 05 May 2011 09:19:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013077</guid><description><![CDATA[ <p>I&#39;m getting the same as Rema43001..</p><p></p><p>Could not load file or assembly &#39;file:///C:\blah\blah\blah\EntityFramework.dll&#39; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)</p><p></p><p>I&#39;ve already had SP1 and the tools update installed BEFORE i started this new project (started agin as advised by rick above) but I am still getting the same error as before.</p><p></p><p>This is so frustrating, can someone please help me out? I really want to get thru this tutorial, but with errors/issues like this, its really hindering my progress.</p><p></p><p>Thanks in advance</p><p></p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/sammie786.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sammie786</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 05 May 2011 09:22:29 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013078</guid><description><![CDATA[ <p>I&#39;ve checked the file path and the dll is there..</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/sammie786.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by muaddibb</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 06 May 2011 02:42:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013087</guid><description><![CDATA[ <p>I feel you, sometimes these tutorials pisses me off more than helping</p><p>&quot;using System.Data.Entity&quot;</p><p>- Right click References in your project</p><p>- Select Add References</p><p>- .NET tab scroll down to System.Data.Entity</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/muaddibb.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by muaddibb</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 06 May 2011 02:43:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013088</guid><description><![CDATA[ <p>One more thing, don&#39;t forget to Rebuild Solution in order to select</p><p>Movie (MvcMovie.Models)</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/muaddibb.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by wintojd</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Fri, 06 May 2011 14:57:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013090</guid><description><![CDATA[ <p>I had:</p><p></p><p>Could not load file or assembly &#39;file:///C:\Users\fiss\documents\visual studio 2010\Projects\MvcMovie\MvcMovie\bin\EntityFramework.dll&#39; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)</p><p></p><p>Finally hit me that my docuements were being stored on the network and synched locally.  Copied the project locally, worked without a problem.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/wintojd.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by khoaisan</title><link>http://asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller</link><pubDate>Thu, 12 May 2011 14:22:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013143</guid><description><![CDATA[ <p>Why, I can&#39;t see Movies.sdf, although I did follow the guide</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/khoaisan.jpg?forceidenticon=false&amp;dt=635048887200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>