<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>Creating a More Complex Data Model for an ASP.NET MVC Application (4 of 10)</title><link>http://asp.net</link><pubDate>Mon, 17 Oct 2011 11:28:48 GMT</pubDate><generator>umbraco</generator><description>Comments for Creating a More Complex Data Model for an ASP.NET MVC Application (4 of 10)</description><language>en</language><atom:link href="http://asp.net/rss/comments/33311" rel="self" type="application/rss+xml" /><item><title>Comment Posted by mejamz</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Fri, 22 Apr 2011 02:12:35 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012931</guid><description><![CDATA[ <p>I had some trouble with issues with the error mentioned in this post and the resolve mentioned worked the couple of time. I finally had to save all and close VS 2010. Once reopend, everythng was fine, even the column name changed to firstName finally :) So far... nice</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mejamz.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by praveen.prasad</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Mon, 25 Apr 2011 15:16:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012962</guid><description><![CDATA[ <p>how to generate entity diagram??</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/praveen.prasad.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Mon, 25 Apr 2011 19:18:35 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012966</guid><description><![CDATA[ <p>@praveen.prasad - I used the Database First designer to create an entity diagram using the database created by Code First. There isn&#39;t a tool available yet to create a diagram directly from the Code First code.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by roux76</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Wed, 27 Apr 2011 11:55:54 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012999</guid><description><![CDATA[ <p>Is there a way to override the Icollection navigation property looking for the foreign key name to be the same as the table primary key?  For example in the Student / Enrollment scenario, what would happen if the field within the Enrollments table was called something other than StudentID?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/roux76.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 28 Apr 2011 19:23:20 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013016</guid><description><![CDATA[ <p>You can name the field whatever you want and add a [ForeignKey(&quot;Student&quot;)] attribute or use a fluent API mapping call to do the same thing. There are links at the end of the last tutorial to documents with more info on both attributes and mapping API.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tobias123</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Fri, 29 Apr 2011 11:23:13 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013026</guid><description><![CDATA[ <p>the modeling in OnModelCreating should be explained a bit more in depth</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tobias123.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Sat, 30 Apr 2011 10:56:42 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013041</guid><description><![CDATA[ <p>@tobias123 - At the end of the last tutorial, one of the links is to a blog post with more information about the mapping fluent API. Is there something in particular that you are looking for here that&#39;s missing but should be present for a basic intro?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tobias123</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Tue, 03 May 2011 12:11:25 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013059</guid><description><![CDATA[ <p>@tdykstra: can you please explain each of these statements:</p><p></p><p>no1:</p><p>modelBuilder.Entity&lt;Instructor&gt;()</p><p>                .HasOptional(p =&gt; p.OfficeAssignment).WithRequired(p =&gt; p.Instructor);</p><p></p><p>An Instructor has an optional/nullable Property OfficeAssignment!??</p><p>Whats the WithRequired for? How to &quot;read&quot; this?</p><p></p><p>No2:</p><p>            modelBuilder.Entity&lt;Course&gt;()</p><p>                .HasMany(c =&gt; c.Instructors).WithMany(i =&gt; i.Courses)</p><p>                .Map(t =&gt; t.MapLeftKey(&quot;CourseID&quot;)</p><p>                    .MapRightKey(&quot;InstructorID&quot;)</p><p>                    .ToTable(&quot;CourseInstructor&quot;));</p><p></p><p>How to &quot;read&quot; this? many-to-many mapping. </p><p>One course can have many instructors!? &lt;- indicated by the HasMany function AND thereby switching the &quot;subject&quot; (from Course to Instructors)!?</p><p></p><p>So that then one instructor can have many courses!? Indicated by the WithMany method but this time WITHOUT(?) switching the subject (back from instructor to course again)!??</p><p></p><p>What key should be on the left and what on the right side? Does this matter anyway in the Map method? </p><p></p><p>     .Map(t =&gt; t.MapLeftKey(&quot;CourseID&quot;)</p><p>                    .MapRightKey(&quot;InstructorID&quot;)</p><p></p><p>thanks, tobi</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tobias123.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 05 May 2011 12:02:42 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013080</guid><description><![CDATA[ <p>@tobi - See my blog post for more info about these API call and links to the API reference documentation: <a rel="nofollow" href="http://blogs.msdn.com/b/aspnetue/archive/2011/04/15/mvc-entity-framework-tutorials-published.aspx" target="_blank">blogs.msdn.com/</a></p><p>In the tutorial I added a link to the blog post right after the part where it talks about the method calls also.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 05 May 2011 16:15:43 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013082</guid><description><![CDATA[ <p>That was the wrong link, here&#39;s the correct one:  <a rel="nofollow" href="http://blogs.msdn.com/b/aspnetue/archive/2011/05/04/entity-framework-code-first-tutorial-supplement-what-is-going-on-in-a-fluent-api-call.aspx" target="_blank">blogs.msdn.com/</a></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by assafg2</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Wed, 11 May 2011 04:33:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013130</guid><description><![CDATA[ <p>Hello, there is a different between the code you have wrote and the explanation </p><p>var courses = new List</p><p>{</p><p>    new Course { CourseID = 1050, Title = &quot;Chemistry&quot;,      Credits = 3, DepartmentID = 3, Instructors = new List() },</p><p>    ...</p><p>};</p><p></p><p>vs </p><p>  new Course { CourseID = 1050, Title = &quot;Chemistry&quot;,      Credits = 3, DepartmentID = 3, Instructors = new List&lt;Instructor&gt;() },</p><p>                new Course { CourseID = 4022, Title = &quot;Microeconomics&quot;, Credits = 3, DepartmentID = 4, Instructors = new List&lt;Instructor&gt;() },</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/assafg2.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by emersion</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Wed, 11 May 2011 05:58:53 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013131</guid><description><![CDATA[ <p>Required(ErrorMessage = &quot;First name is required.&quot;)] </p><p>How to make above messages language specific ? e.g. if I want to give message based on user&#39;s selected language then how it can be achieved ?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/emersion.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Wed, 11 May 2011 17:04:14 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013136</guid><description><![CDATA[ <p>See this MSDN page and these StackOverflow threads:</p><p><a rel="nofollow" href="http://msdn.microsoft.com/en-us/library/gg674880(v=vs.98).aspx" target="_blank">msdn.microsoft.com/</a></p><p><a rel="nofollow" href="http://stackoverflow.com/questions/3758512/localize-data-annotations-default-messages-required-stringlength-etc" target="_blank">stackoverflow.com/</a></p><p><a rel="nofollow" href="http://stackoverflow.com/questions/2347650/how-to-use-dataannotations-errormessageresourcename-with-custom-resource-solution" target="_blank">stackoverflow.com/</a></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by hsharber</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Sat, 28 May 2011 20:23:01 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013304</guid><description><![CDATA[ <p>For the entity Enrollment, why do you include the foreign keys as well as the navigation properties for Course and Student? Wouldn&#39;t the navigational property be able to provide its key?</p><p></p><p>I can see that you&#39;ve done this for other entities whenever there is a one-to-one relationship. Does it have a use that the navigational property doesn&#39;t provide?</p><p></p><p>Thanks for the series.  </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/hsharber.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Tue, 31 May 2011 11:34:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013340</guid><description><![CDATA[ <p>@hsharber - See the section on Foreign Key Associations in <a rel="nofollow" href="http://www.asp.net/entity-framework/tutorials/what-s-new-in-the-entity-framework-4" target="_blank">www.asp.net/</a> </p><p>In web applications it is often much easier to work with foreign keys than it is to work with navigation properties; you often have a foreign key value and can insert or update an entity using that without having to retrieve the entity that the foreign key refers to in order to use the navigation property to establish the relationship.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by godspeed1208</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Wed, 24 Aug 2011 18:04:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014049</guid><description><![CDATA[ <p>Thanks for the help,was having trouble with <a rel="nofollow" href="http://www.enticemarketing.com" target="_blank">www.enticemarketing.com</a></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/godspeed1208.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by wrlucas</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 01 Sep 2011 18:55:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014106</guid><description><![CDATA[ <p>I comment out this code in the Global.asax.cs file</p><p></p><p>//Database.SetInitializer&lt;SchoolContext&gt;(new SchoolInitializer());</p><p></p><p>Once I have created the database I want to  be able to work with as if it were the production version.</p><p></p><p>But simply adding this attribute:</p><p></p><p>        [MaxLength(50)] </p><p>        public string LastName { get; set; }</p><p></p><p>To the LastName property in the Student class, I get the below error when executing this code in the Index method of the Student Controller:</p><p></p><p>            var students = from s in db.Students</p><p>                           select s;</p><p>Why is this even an issue.  The structure of the database has not changed -- just the business rule for LastName.</p><p></p><p>System.InvalidOperationException was unhandled by user code</p><p>  Message=The model backing the &#39;SchoolContext&#39; context has changed since the database was created. Either manually delete/update the database, or call Database.SetInitializer with an IDatabaseInitializer instance. For example, the DropCreateDatabaseIfModelChanges strategy will automatically delete and recreate the database, and optionally seed it with new data.</p><p>  Source=EntityFramework</p><p>  StackTrace:</p><p>       at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)</p><p>       at System.Data.Entity.Internal.InternalContext.&lt;&gt;c__DisplayClass5.&lt;PerformDatabaseInitialization&gt;b__3()</p><p>       at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)</p><p>       at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()</p><p>       at System.Data.Entity.Internal.LazyInternalContext.&lt;InitializeDatabase&gt;b__4(InternalContext c)</p><p>       at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)</p><p>       at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)</p><p>       at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()</p><p>       at System.Data.Entity.Internal.InternalContext.Initialize()</p><p>       at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)</p><p>       at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()</p><p>       at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()</p><p>       at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()</p><p>       at System.Linq.Queryable.Select[TSource,TResult](IQueryable`1 source, Expression`1 selector)</p><p>       at ContosoUniversity.Controllers.StudentController.Index(String sortOrder, String currentFilter, String searchString, Nullable`1 page) in D:\Visual Studio 2010 Projects\MVC\ContosoUniversity\ContosoUniversity\Controllers\StudentController.cs:line 43</p><p>       at lambda_method(Closure , ControllerBase , Object[] )</p><p>       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)</p><p>       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)</p><p>       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)</p><p>       at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass15.&lt;InvokeActionMethodWithFilters&gt;b__12()</p><p>       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)</p><p>  InnerException:</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/wrlucas.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by wrlucas</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 01 Sep 2011 20:27:40 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014108</guid><description><![CDATA[ <p>This is a great tutorial.  But how about one that addresses database first but not in the clunky way I have seen every other tutorial do it.  Either they generate a conceptual model or it is just a comment after a tutorial like this.  There must be elegant solutions equal to Code First.  How often does the opportunity for code first come up?  Zero, in my life.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/wrlucas.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by TheGDizzo</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Fri, 02 Sep 2011 15:24:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014111</guid><description><![CDATA[ <p>In the tutorial series soo far... I have not picked-up on the meanings of some of the piece-parts (in the parenthesis) of the &quot;Fluent API&quot; coding you&#39;ve shown. </p><p></p><p>For example, in :</p><p></p><p>        protected override void OnModelCreating(DbModelBuilder modelBuilder) </p><p>        { </p><p>            modelBuilder.Conventions.Remove&lt;PluralizingTableNameConvention&gt;(); </p><p>            modelBuilder.Entity&lt;Instructor&gt;() </p><p>                .HasOptional(p =&gt; p.OfficeAssignment).WithRequired(p =&gt; p.Instructor); </p><p>            modelBuilder.Entity&lt;Course&gt;() </p><p>                .HasMany(c =&gt; c.Instructors).WithMany(i =&gt; i.Courses) </p><p>                .Map(t =&gt; t.MapLeftKey(&quot;CourseID&quot;) </p><p>                    .MapRightKey(&quot;InstructorID&quot;) </p><p>                    .ToTable(&quot;CourseInstructor&quot;)); </p><p>            modelBuilder.Entity&lt;Department&gt;() </p><p>                .HasOptional(x =&gt; x.Administrator); </p><p>        }</p><p>What the heck do the &quot;p&quot;, &quot;c&quot;, &quot;t&quot;, and &quot;x&quot; correlate too in the statements which describe .HasMany( ) and .WithMany( ) relationships? They seem to have no ryhme-or-reason and are just mnemonic placeholders you&#39;ve chosen off the top of your head I take it?  </p><p></p><p>Also... if you could write a little blurb on what the English sentence translation of what (for example) &quot;(c =&gt; c.Instructors)&quot; is stating... specifically the &quot;=&gt;&quot; symbol... I&#39;d be very appreciative. I hate not knowing what some of the syntax pieces are saying to me.</p><p></p><p>Also... on the &quot;Fluent API&quot; link you provided... the code samples and description of them had their width cutoff with no way to scroll or stretch the screen to be able to view what I was missing (most likely because my default Font size I bumped-up one notch bigger the other day since doing soo much reading thru these tutorials)</p><p></p><p>Please let me know if further clarification is required.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/TheGDizzo.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 08 Sep 2011 17:07:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014155</guid><description><![CDATA[ <p>@wrlucas - The first two of the three tutorial series at <a rel="nofollow" href="http://asp.net/entity-framework/tutorials" target="_blank">asp.net/</a> are database first; specifically how would you change the approach in those tutorials?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 08 Sep 2011 17:27:43 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014156</guid><description><![CDATA[ <p>@TheGDizzo - Great questions.  These are lambda expressions, and the best explanation of lambdas available on the web that I&#39;ve seen is at:</p><p><a rel="nofollow" href="http://www.c-sharpcorner.com/uploadfile/freebookarticles/addisonwesley/2009oct13001134am/DelegatesLambda/1.aspx" target="_blank">www.c</a></p><p>This is a book chapter that starts out on delegates -- to go straight to lambdas if you&#39;re already familiar with delegates, anonymous methods, etc., go to the 5th page.</p><p></p><p>Thanks for the note about the code font size on the Fluent API code block; I&#39;ve changed it to a smaller font and added line breaks.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by controlaltdelete</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Sun, 02 Oct 2011 03:06:17 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014313</guid><description><![CDATA[ <p>I created classes as given in the tutorial, yet there was no change in School.sdf. In schoolcontext and schoolinitializer i am getting these errors: </p><p>&#39;ContosoUniversity.Models.Course&#39; does not contain a definition for &#39;DepartmentID&#39; and &#39;ContosoUniversity.Models.Course&#39; does not contain a definition for &#39;Instructors&#39;. Please help me.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/controlaltdelete.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Thu, 06 Oct 2011 14:32:40 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014341</guid><description><![CDATA[ <p>@controlaltdelete - The quickest way to find where you might have missed a step is to download the completed project (see download links at the top of the tutorial) and compare its files with what you have created by following the tutorial.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by maximusmd</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Mon, 10 Oct 2011 11:35:38 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014377</guid><description><![CDATA[ <p>What if I did not use the OnModelCreating method? for instance, would it be ok to create a table CourseInstructor and create the associate links between Course and Instructorby using a EDMX file?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/maximusmd.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ManAtArms_Kal</title><link>http://asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-a-more-complex-data-model-for-an-asp-net-mvc-application</link><pubDate>Mon, 17 Oct 2011 11:28:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014437</guid><description><![CDATA[ <p>In &quot;Entity Diagram Showing Relationships&quot; chapter,you says :&quot;zero-or-one-to-many relationship line (0..1 to *) between the Department and Instructor entities.&quot; </p><p>and then ,in &quot;Customizing the Database Context&quot; chapter,you says: &quot;•A one-to-zero-or-one relationship between the Department and Instructor tables, represented by the Department.Administrator navigation property&quot;</p><p>This is why? Would you help me understand above different.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/ManAtArms_Kal.jpg?forceidenticon=false&amp;dt=635050501200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>