<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>Implementing Basic CRUD Functionality with the Entity Framework in ASP.NET MVC Application (2 of 10)</title><link>http://www.asp.net</link><pubDate>Fri, 25 Jan 2013 13:03:58 GMT</pubDate><generator>umbraco</generator><description>Comments for Implementing Basic CRUD Functionality with the Entity Framework in ASP.NET MVC Application (2 of 10)</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/33309" rel="self" type="application/rss+xml" /><item><title>Comment Posted by mejamz</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Thu, 21 Apr 2011 23:31:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012928</guid><description><![CDATA[ <p>Excellent video, moving on to the next one; I really appreciate the explanations and links to more information... finally, a video series I can follow and one that resolves several issues for me... thank you</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/mejamz.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ptn1</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 23 May 2011 15:25:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013252</guid><description><![CDATA[ <p>Following the Steps. I have a System.NullReferenceException error at  @foreach (var item in Model.Enrollments).  Exploring Model.Enrollments debug shows Null for Enrollments property.  I am assuming I have a problem in the Model but nothing is obvious. Any suggestions?</p><p>  </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ptn1.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ptn1</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 23 May 2011 15:29:14 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013253</guid><description><![CDATA[ <p>Found the issue (of course) after I submitted the comment.  I was missing &quot;virtual&quot; in the Enrollment collection definition in the Student class.</p><p></p><p>    public class Student</p><p>    {</p><p>        ...</p><p>        public virtual ICollection&lt;Enrollment&gt;  Enrollments { get; set; }</p><p>    }</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ptn1.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by obdense</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 30 May 2011 08:17:22 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013323</guid><description><![CDATA[ <p>Excellent tutorial.</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/obdense.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by bpatin</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Tue, 26 Jul 2011 11:13:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013838</guid><description><![CDATA[ <p>Many if not most enterprises with complex data structures expect to use stored procedures for their CRUD operations, and database views, not necessarily updateable, to actually read the data, and I would really like tutorials on how to set up a project that primarily does that.  Too many new Microsoft developers seem to be afraid to work with SQL these days, but the MVC and Entity Framework they have tried to sell us are essentially incomplete and unusable in a large enterprise without these capabilities. Stored procedures in the database can often get the job done much more quickly and effectively that trying to do everything in code.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/bpatin.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Fri, 29 Jul 2011 18:12:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013877</guid><description><![CDATA[ <p>@bpatin - Thanks for the comment. EF 4.0 Database First supports stored procedures -- see the first of the three EF tutorial series on this site. EF Code First does not support stored procedures yet, but it is on the list of planned enhancements for the future.  In Code First you can call stored procedures but you have to do it manually the same way you would execute a SQL statement; the last tutorial in this series shows how to do that.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Ne7ven</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Wed, 03 Aug 2011 13:50:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013896</guid><description><![CDATA[ <p>at step create Edit views, after i resembled demo code and add view to my HttpPost Edit method and F5 to run code, debug point at first line of Edit Method, but when i clicked save nothing happen. please help </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/Ne7ven.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by oppdal</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 08 Aug 2011 09:23:54 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013927</guid><description><![CDATA[ <p>I don&#39;t see the dispose method in my StudentController.cs</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/oppdal.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ricka6</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Tue, 16 Aug 2011 20:37:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013974</guid><description><![CDATA[ <p>oppdal : dispose method in my StudentController.cs</p><p>The MVC scaffolding system automatically adds this. If you followed the instruction on the previous page &quot;Creating a Student Controller&quot;, the Dispose override is automatically added to the end of the StudentController class.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/ricka6.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Tue, 23 Aug 2011 14:57:57 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014023</guid><description><![CDATA[ <p>@Ne7ven - If you&#39;re stopped at a breakpoint you will have to continue from the breakpoint in order for the web page to work.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by payini</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 03 Oct 2011 19:07:02 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014322</guid><description><![CDATA[ <p>Great Tutorial!</p><p></p><p>Thanks.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/payini.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by SavantKing10</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 02 Apr 2012 07:32:00 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015237</guid><description><![CDATA[ <p>How U can make an submenu item navigation. For example u want to have some subitmes vertical under the parent menu: Students. How to will manage that?? I am looking in the internet but I dont see any solutions in the internet. Can u give me an example . THX!!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/SavantKing10.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Thu, 12 Apr 2012 22:03:10 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015315</guid><description><![CDATA[ <p>@SavantKing10 - For questions not directly about the content of the tutorial, it&#39;s best to post them to the appropriate ASP.NET forum, in this case that would probably be the MVC forum:  <a rel="nofollow" href="http://forums.asp.net/1146.aspx/1?MVC" target="_blank">forums.asp.net/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by nhajje</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Sun, 22 Apr 2012 00:37:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015389</guid><description><![CDATA[ <p>Never mind, I finally figured it out. I had created the &quot;EnrollmentDateGroup.cs&quot; file in the Models folder and then moved it to the ViewModels Folder. When I created the file in the Models folder it assigned the namespace  as &quot;namespace ContosoUniversity.Models&quot;. Since I moved the file to &quot;ViewModels&quot; it kept the namespace name the same. The fix was to rename the namespace to &quot;namespace ContosoUniversity.ViewModels&quot;. Its best to delete the file and recreate it in the &quot;ViewModels&quot; folder.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/nhajje.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Richard Scannell</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Mon, 30 Apr 2012 06:09:30 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015433</guid><description><![CDATA[ <p>I have got the full tutorial working, but am confused about the different subfolders &amp; what goes where. 4 folders are &#39;data related&#39; &amp; they seem to overlap: </p><p>&#39;Models&#39; has entity definitions &amp; validation rules . (Classic MVC - I get this!)</p><p>&#39;App_Data&#39; contains a pointer to the actual data tables. ( Also clear).</p><p>DAL  &amp; ViewModels are where my confusion arises.  </p><p>In DAL, what is the function of the *Repository &amp; *Context files? </p><p>What are the ViewModels  - why aren&#39;t they in Models?</p><p></p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/Richard%20Scannell.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Wed, 16 May 2012 15:08:40 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015530</guid><description><![CDATA[ <p>@Richard Scannell - DAL stands for Data Access Layer. The classes in this folder are related to working with the database. You&#39;ll often see them in a separate class library project but for simplicity they&#39;re in a folder here. The ViewModels folder is for models that are created only for passing data to and from an MVC view.  So for instance, the Student class is in Models:  you use it in many different contexts and it represents an actual entity that the application works with. The EnrollmentDateGroup class is in ViewModels because it is a special-purpose class for use only with one MVC view.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jota2007</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Wed, 13 Jun 2012 11:00:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015762</guid><description><![CDATA[ <p>One more step successfully completed!! Thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/jota2007.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Nithin Prakash</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Sat, 23 Jun 2012 22:15:40 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015834</guid><description><![CDATA[ <p>Thanks for the detailed explaination:)</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Nithin%20Prakash.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gopi_krishnag</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Wed, 18 Jul 2012 12:48:05 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016004</guid><description><![CDATA[ <p>hi Nice article,  here i am having a doubt , In the Students detail page, Students Enrollments details are appearing, how to add the enrollment details while add/modify the student page. please let me know</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/gopi_krishnag.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Thu, 19 Jul 2012 20:57:46 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016014</guid><description><![CDATA[ <p>#gopi_krishnag - The Edit Get method retrieves the entity by using the same method that the Details method uses; you should be able simply to add the same Razor code to the Edit view that displays the enrollments in the Details view.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by victorwoo</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Tue, 07 Aug 2012 02:28:28 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016124</guid><description><![CDATA[ <p>If I want the SQL Update statement to update only the fields that the user actually changed, what&#39;s the difference of by using Find() &amp; by using Attatch() ?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/victorwoo.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by juliandormon</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Wed, 22 Aug 2012 19:06:15 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016261</guid><description><![CDATA[ <p>Thanks for for this great tutorial! The scaffolding from objects is a real time saver but I feel daft when dealing with partial updates. What is the proper way to create a view that contains a form with fields that correspond with only a few database columns? And what is the proper way to handle a partial entity/record update for that form? I cannot hide all the entity values in hidden form variables for various security reasons. Thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/juliandormon.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by gagouche</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Fri, 28 Sep 2012 14:14:50 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016542</guid><description><![CDATA[ <p>Thank you so much for this tutorial. </p><p>Question: </p><p>I was experiment with the code, and I change the details. Why would the code below work?</p><p></p><p>var student = db.Students.Include(&quot;Course&quot;).Include(&quot;Enrollment&quot;).Single(a =&gt; a.StudentID == id);</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/gagouche.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by suicida</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Tue, 09 Oct 2012 11:37:52 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016593</guid><description><![CDATA[ <p>Hi Tom,</p><p></p><p>My Browser language is en-CA and not en-US which I assume you were using. So I tried to change the EnrollmentDate of a Student (or any Date for any object) and the Validation didn&#39;t accept values in the format &quot;DD/MM/YYYY&quot;. The only solution was adding the &lt;globalization culture=&quot;en-US&quot; uiCulture=&quot;auto&quot; /&gt; line in Web.config. However I&#39;m curious how can you implement the validation for another Cultures?</p><p></p><p>Thank you!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/suicida.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by kammer</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-basic-crud-functionality-with-the-entity-framework-in-asp-net-mvc-application</link><pubDate>Fri, 25 Jan 2013 13:03:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018251</guid><description><![CDATA[ <p>Thanks you so much, Tom !!!</p><p>Boris.</p><p>Russia.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/kammer.jpg?forceidenticon=false&amp;dt=635048335800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>