<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
	<title>Programming Entity Framework Book Forum</title>
	<description><![CDATA[O'Reilly's Programming Entity Framework Book Forum]]></description>
	<link>http://forums.oreilly.com/index.php</link>
	<pubDate>Fri, 20 Nov 2009 15:41:19 -0500</pubDate>
	<ttl>120</ttl>
	<image>
		<title>Programming Entity Framework Book Forum</title>
		<url>http://oreilly.com/catalog/covers/9780596520281_bkt.gif</url>
		<link>http://forums.oreilly.com/index.php</link>
	</image>
	<item>
		<title>Chapter 19 Model</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5587</link>
		<description><![CDATA[Hi Julie,<br /><br />Was really looking forward to this chapter. What's up with the model in the book???? (Figure 19-1).<br /><br />The script for the SalesOrderHeader table in AdventureWorksSuperLT that your Order entity in the figure is based on doesn't include the TaxAmt, Freight, or TotalDue fields that your chapter wants to focus on Here's the fields from the script download. <br /><br />[SalesOrderID] <br />[OrderDate] <br />[DueDate] <br />[OnlineOrderFlag] <br />[SalesOrderNumber]  <br />[PurchaseOrderNumber] <br />[AccountNumber] <br />[CustomerID] <br />[BillToAddressID] <br />[CreditCardApprovalCode] <br />[SubTotal] <br />[Comment]<br />[ModifiedDate] <br />[ShipDate] <br /><br />Also the Detail entity in the figure includes the SalesOrdeID foreign key field. How did that get there? <br /><br />Please respond. I'd really like to work this chapter.]]></description>
		<pubDate>Tue, 17 Nov 2009 18:44:21 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5587</guid>
	</item>
	<item>
		<title><![CDATA[Can't Find Chapter 18 Extension Methods]]></title>
		<link>http://forums.oreilly.com/index.php?showtopic=5581</link>
		<description>Where in the downloads are the EntityDetails and EntitiesFromContext extension methods mentioned on pages 613 and 614??</description>
		<pubDate>Mon, 16 Nov 2009 21:34:04 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5581</guid>
	</item>
	<item>
		<title>Objectstateentry Visualizer</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5565</link>
		<description><![CDATA[How do I get the ObjectStateEntry visulaizeer to display in Debug mode. Page 536 mentions that the extension method  has "an attribute that makes it available only during debugging."<br /><br />I don't see that attribute in the book or the source code.<br /><br />I'm using the C# version. I see the ConditionalAttribute for the VB version.<br /><br />Runs fine without debugging.<br /><br />Thanks,<br /><br />Bob]]></description>
		<pubDate>Fri, 13 Nov 2009 19:16:04 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5565</guid>
	</item>
	<item>
		<title>Asp.net Authentication And Ef</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5556</link>
		<description>We are starting the development of a Silverlight application using ASP.NET Authentication and the Entity Framwork.  We are planning on extending the ASP.NET Authentication tables with our own user information (First name, last name, phone number, etc.).  We are planning on joining the ASP.NET Authentication tables to our extended tables using foreign key relationship on the UserId in the aspnet_Users table.  We will leave the ASP.NET Authentication tables out of our EF model.  Does anyone have any thoughts on this approach?  Can anyone recommend any best practices when using ASP.NET Authentication and the Entity Framework?</description>
		<pubDate>Thu, 12 Nov 2009 09:19:20 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5556</guid>
	</item>
	<item>
		<title>Chapter 21 Object Datasource Error:</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5545</link>
		<description><![CDATA[I have been following the book fairly close but am getting an error I do not understand.  I am using my own data model and am currently working with an entity with only 1 association.  This association is not displayed in the grid I am using.  I have followed the special instructions located on pages 705 and 706 but am getting an error on insert of ObjectDataSource '' could not find a non-generic method '' that has parameters:vendorCrew, orig_vendorCrew, Bio, VendorCrewId, IsActive, LastName, FirstName.<br /><br />Why is it looking for the individual fields associated in the entity and how do I get around this?]]></description>
		<pubDate>Mon, 09 Nov 2009 18:07:56 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5545</guid>
	</item>
	<item>
		<title>Binding To Objectresult</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5534</link>
		<description><![CDATA[I am confused as to what is the best type of collection for the DataSource of a BindingSource that I want to bind to a combo box with full CRUD capability.<br />Chapter 8 explicitly advises to bind to an ObjectResult and not a List(of T) but I cannot see how to sort the results.]]></description>
		<pubDate>Sat, 07 Nov 2009 17:24:59 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5534</guid>
	</item>
	<item>
		<title>Using Defining Query To Create Your Own Views</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5525</link>
		<description><![CDATA[Hi Julie,<br /><br />If you get a chance, ran into another bump: Creating an association between the new UnpaidReservation entity and the Reservation entity. I know you're extremely busy, so please disregard my previous post. I'm more concerned about this one, because you are keeping the DefiningQuery as a permanent addition to the model going forward. I'd really like to get it to run. All the code I'm using is straight out of the walk-through.<br /><br />Here's my problem:<br /><br />1. UnpaidReservation has a Key of ReservationID.<br />2. Reservation has a Key of ReservationID.<br />3. The One to Many association - 'ReservationUnpaidReservation' - maps the Reservation entity's Key to the UnpaidReservation entity's Key.<br /><br />How is this possible? Shouldn't the Reservation entity have to map its Key to a FORIEGN KEY defined in the many-side entity (virtual table). But there is no foreign key defined in the many-side entity.<br /><br />What we end up with - as illustrated in the book - is the Store.UnpaidReservations.ReservationID property mapped to TWO other properties: both the BAModel.UnpaidReservation.ReservationID and the BAModel.Reservation.ReservationID.<br /><br />The Entity Framework doesn't like this. When I run the code in Example 13-9, page 377, I get:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->error 3021: Problem in Mapping Fragment starting at line 354: <br /><br />Each of the following columns in table UnpaidReservations is mapped to multiple conceptual side properties:<br /><br />UnpaidReservations.ReservationID is mapped to<br /> <br />ReservationUnpaidReservation.UnpaidReservation.ReservationID, <br />ReservationUnpaidReservation.Reservation.ReservationID<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />My AssociationSetMapping that is causing the problem:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;AssociationSetMapping Name=&#34;ReservationUnpaidReservation&#34; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TypeName=&#34;BAModel.ReservationUnpaidReservation&#34; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StoreEntitySet=&#34;UnpaidReservations&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;EndProperty Name=&#34;UnpaidReservation&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;ScalarProperty Name=&#34;ReservationID&#34; ColumnName=&#34;ReservationID&#34; /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/EndProperty&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;EndProperty Name=&#34;Reservation&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;ScalarProperty Name=&#34;ReservationID&#34; ColumnName=&#34;ReservationID&#34; /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/EndProperty&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/AssociationSetMapping&#62;<!--c2--></div><!--ec2--><br /><br />Thanks,<br /><br />Bob<br /><br /><br /><br />]]></description>
		<pubDate>Wed, 04 Nov 2009 20:07:59 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5525</guid>
	</item>
	<item>
		<title>Adding Native View To Model</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5518</link>
		<description><![CDATA[Hello,<br /><br />When I run the SQL on page 368 in the section 'Adding Native View to Model' in SqlServer, the correct records are returned. I'm using ContactID 199. Two payments: $800.00 and $1500.<br /><br />I created the Function:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;Function Name=&#34;PaymentsforContact&#34; IsComposable=&#34;false&#34; &#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;CommandText&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SELECT Payments.PaymentDate,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Payments.Amount,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reservations.ReservationDate,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact.FirstName,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact.LastName,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Events.StartDate,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Events.EndDate,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locations.LocationName<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM&nbsp;&nbsp; Payments INNER JOIN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reservations ON Payments.ReservationID = Reservations.ReservationID INNER JOIN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact ON Reservations.ContactID = Contact.ContactID INNER JOIN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Events ON Reservations.EventID = Events.EventID INNER JOIN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Locations ON Events.LocationID = Locations.LocationID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE Contact.ContactID = @ContactID<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/CommandText&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Parameter Name=&#34;ContactID&#34; Type=&#34;int&#34; Mode=&#34;In&#34; /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Function&#62;<!--c2--></div><!--ec2--><br /><br />When I execute the following line ofo code:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->var payments = context.PaymentsforContact&#40;199&#41;.ToList&#40;&#41;;<!--c2--></div><!--ec2--><br /><br />the List contains 2 objects of type 'vPaymentsforPeriod' as expected. Oddly, they both contain the same data, the payment made on 4/6/2008 for $800. I was expecting the second object to contain data for the other payment made on 1/1/2008 for $1500.<br /><br />Any thoughts??<br /><br />Thanks,<br /><br />Bob]]></description>
		<pubDate>Tue, 03 Nov 2009 21:58:02 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5518</guid>
	</item>
	<item>
		<title>Chapter 8 - Winforms Binding Problem</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5505</link>
		<description><![CDATA[Hi Julia,<br /><br />First of all thank you for providing us a very good book on a promising new subject-Entity Framework. I really enjoy reading it.<br /><br />While reading chapter 8 first part on WinForms application everything works fine with your sample code. However when I tried to bind all four combo boxes in code only:<br /><br />private void FillCombos()<br />        {<br />            PrimaryActivityComboBox.DisplayMember = "ActivityName";<br />            PrimaryActivityComboBox.ValueMember = "ActivityID";<br />            PrimaryActivityComboBox.DataSource = activities;<br />            //SelectedItem is handy for working with related data<br />            //this identifies an entire entity, not just an ID<br />            PrimaryActivityComboBox.DataBindings.Add(new Binding("SelectedItem", customerBindingSource,<br />                                                                 "PrimaryActivity", true));<br /><br />            PrimaryDestinationComboBox.DisplayMember = "DestinationName";<br />            PrimaryDestinationComboBox.ValueMember = "DestinationID";<br />            PrimaryDestinationComboBox.DataSource = destinations;<br />            PrimaryDestinationComboBox.DataBindings.Add(new Binding("SelectedItem", customerBindingSource,<br />                                                                    "PrimaryDestination", true));<br /><br />            SecondaryActivity.DisplayMember = "ActivityName";<br />            SecondaryActivity.ValueMember = "ActivityID";<br />            SecondaryActivity.DataSource = activities;<br />            SecondaryActivity.DataBindings.Add(new Binding("SelectedItem", customerBindingSource,<br />                                                                 "SecondaryActivity", true));<br /><br />            SecondaryDestination.DisplayMember = "DestinationName";<br />            SecondaryDestination.ValueMember = "DestinationID";<br />            SecondaryDestination.DataSource = destinations;<br />            SecondaryDestination.DataBindings.Add(new Binding("SelectedItem", customerBindingSource,<br />                                                                    "SecondaryDestination", true));<br />        }<br /><br /><br />and cleared all binding properties in the designer, things started to work wrong. The PrimaryActivity and PrimaryDestination combos are showing the correct values but the SecondaryActivity and SecondaryDestination controls shows exactly the same values as their primary counterparts.<br />The same behaviour when binding all four combos in designer only and commenting out the content of FillCombos method.<br /><br />What can be the cause of this?<br /><br />Thanks,<br />Dan]]></description>
		<pubDate>Sun, 01 Nov 2009 03:29:54 -0500</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5505</guid>
	</item>
	<item>
		<title>Broken Links</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5466</link>
		<description><![CDATA[Chapter 3:<br /><br /> Some great articles are available that can help you learn more about lambda expressions. For C# developers, the excellent MSDN Magazine article by Anders Hejlsberg (a.k.a. The Father of C#), "The Evolution of LINQ and Its Impact on the Design of C#" (http://msdn.microsoft.com/msdnmag/issues/07/06/CSharp30/), has a great explanation of lambdas. For VB developers, the great MSDN Magazine article by Timothy Ng, "Basic Instincts: Lambda Expressions" (http://msdn.microsoft.com/msdnmag/issues/07/09/BasicInstincts/), puts lambdas into perspective.<br /><br />Al these links are broken]]></description>
		<pubDate>Wed, 21 Oct 2009 20:00:19 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5466</guid>
	</item>
	<item>
		<title><![CDATA[C:&#092;databases]]></title>
		<link>http://forums.oreilly.com/index.php?showtopic=5464</link>
		<description><![CDATA[Make sure you create the C:&#092;databases folder before you run the Create_ProgrammingEFDB1 script.]]></description>
		<pubDate>Tue, 20 Oct 2009 18:46:30 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5464</guid>
	</item>
	<item>
		<title>Customize Custom Pages</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5444</link>
		<description>I need help finding tutorials that tell you how to customize edit.aspx insert.aspx and details.aspx.  When using scaffolding the only thing I have managed to do is learn how to limit what columns are returned.  I need some help finding other racecourses how to customize it further</description>
		<pubDate>Wed, 14 Oct 2009 11:03:50 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5444</guid>
	</item>
	<item>
		<title>Dto Objects</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5439</link>
		<description><![CDATA[Julie,<br /><br />Why create DTO objects and not simply use Entity Objects that are detached from the context? <br />ie pass to the client the object that comes back from your GetDetachedFromServer methods?<br /><br />Just a curosity...<br /><br />--Ming<br />(hsueh010)<br />]]></description>
		<pubDate>Tue, 13 Oct 2009 16:18:35 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5439</guid>
	</item>
	<item>
		<title>Chapter 20 With Locking</title>
		<link>http://forums.oreilly.com/index.php?showtopic=5414</link>
		<description><![CDATA[As I look at the Chapter 20 example, I am asking myself why none of the thread locking described on pp. 516-520 are required.  In Chapter 20, a single form is used.  Does the use of a single form obviate the need for thread locking when accessing the database through a context?<br /><br />I would have thought that the various windows events would cause the creation of multiple threads, but that must not be the case in .net.<br /><br />I am trying to create a simple three form application, but I keep getting an error telling me that I cannot access an EntityContext from multiple threads.  <br /><br />So, as I understand it, I need to create a single thread for database accesses or use a single form, is that accurate?<br /><br />thanks,<br /><br />John]]></description>
		<pubDate>Tue, 06 Oct 2009 21:54:55 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5414</guid>
	</item>
	<item>
		<title><![CDATA[The Member With Identity 'group' Does Not Exist In The Metadata Collection.]]></title>
		<link>http://forums.oreilly.com/index.php?showtopic=5411</link>
		<description><![CDATA[Hi Julie,<br /><br />Several issues with entity framework have been causing me great grief. The most likely reasons are of course my limited knowledge on how to get the work done with EF.<br /><br />From working with EF, I'm taking that the design is really not meant for use when the context is disconnected. (ASP.NET/Silverlight/WCF). There a lot of plumbing involved when we're trying to reconnect the disconnected object back up.<br /><br />The second issue is how to handle recursive objects. I've stopped doing the eager loading, which I believe was causing some major looping problems. So I've had to create plumbing to handle the disconnected recursive objects.<br /><br />Also I guess due to my inexperience, I'm not sure what some of the errors mean.<br /><br />I've been following your pattern in Chapter 22 "UpdateChildren&lt;TEntity&gt;" method.<br /><br />I've been having problems with the "Add" portion.<br /><br />For the "Add" I am getting the error<br />Currently I'm getting the error:<br /><b>The member with identity 'Group' does not exist in the metadata collection.</b><br />(I don't understand this error... I have a Entities.Group object in my .edmx file)<br />The line that is giving me the error is:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>childCollectionAttached.Add(addedChildren.ToList()[i]);<br /></div><br /><br />childCollectionAttached is of type EntityCollection&lt;Knowledge.EntityRelations.Group&gt;<br />and <br />addedChildren.ToList()[i] is of type Knowledge.EntityRelations.Group<br /><br />Since I'm adding a new item...<br />properties of addedChildren.ToList()[i]<br />EntityKey = null<br />EntityState = Detached<br />GroupId (the Primary Key, autonumber in SQL) = 0<br /><br />It sounds like the error is saying that the item I'm trying to add doesn't exist in "Group", but shouldn't that be the case, I mean after all I'm wanting to add this object.<br /><br />There are two additional Properties in Group, the Member and the ParentMember. I've reduced these to their respective MemberId's<br />So <br />MemberReference.EntityKey = new EntityKey("Entities.Members", "MemberId", addedChildren.ToList()[i].Member.MemberId);<br /><br />ParentMemberReference.EntityKey = new EntityKey("Entities.Members", "MemberId", addedChildren.ToList()[i].ParentMember.MemberId);<br /><br />And I've set the two properties<br />Member = null<br />ParentMember = null<br /><br />I'd be happy to attach my code if you think it would help.<br /><br />Thanks you've been a great help in getting me through EF.<br /><br />]]></description>
		<pubDate>Tue, 06 Oct 2009 13:05:06 -0400</pubDate>
		<guid>http://forums.oreilly.com/index.php?showtopic=5411</guid>
	</item>
</channel>
</rss>