<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET 3.5 Extensions Preview</title><link>http://forums.asp.net/1147.aspx</link><description>Setup issues and general questions regarding this release. For specific topics use &lt;a href="http://forums.asp.net/1146.aspx"&gt;ASP.NET MVC&lt;/a&gt;, &lt;a href="http://forums.asp.net/1154.aspx"&gt;ASP.NET Controls for Silverlight&lt;/a&gt;, &lt;a href="http://forums.asp.net/1145.aspx"&gt;ASP.NET Dynamic Data&lt;/a&gt;, &lt;a href="http://go.microsoft.com/fwlink/?linkid=96773"&gt;ADO.NET Entity Framework&lt;/a&gt;, &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1430&amp;SiteID=1"&gt;ADO.NET Data Services&lt;/a&gt; or the &lt;a href="http://forums.asp.net/1008.aspx"&gt;ASP.NET AJAX UI&lt;/a&gt; forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Entity Framework and Splitting Confusion</title><link>http://forums.asp.net/thread/3175725.aspx</link><pubDate>Wed, 20 May 2009 13:53:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3175725</guid><dc:creator>cgeers</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3175725.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1147&amp;PostID=3175725</wfw:commentRss><description>&lt;p&gt;Jumpingmattflash,&lt;/p&gt;
&lt;p&gt;Setup your database structure as follows:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Table [Person]&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;PersonId (Primary key)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Name&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;PersonTypeId&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Table [PersonType]&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;PersonTypeId (Primary key)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Name&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Put a foreign key on the [Person] table pointing to the [PersonType] table (Person.PersonTypeId -&amp;gt; PersonType.PersonTypeId). You should link a person to a type using the primary key value of the PersonType table, not the value of the name of the type.&lt;/p&gt;
&lt;p&gt;Next add a new Entity Data Model to your solution and have it generate a model from this database. Just select those two tables to include in the model.&lt;/p&gt;
&lt;p&gt;If you are having trouble with this, please send me a private message and I&amp;#39;ll whip up an example.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Christophe&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Entity Framework and Splitting Confusion</title><link>http://forums.asp.net/thread/3115637.aspx</link><pubDate>Fri, 24 Apr 2009 09:14:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3115637</guid><dc:creator>jumpingmattflash</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3115637.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1147&amp;PostID=3115637</wfw:commentRss><description>Hi guys,

I think i&amp;#39;m missing the point somewhere along the line when it comes to entity framework but i&amp;#39;m convinced I should be able to to do this.

I&amp;#39;ve got two related tables, for the sake of argument lets call them person(personid, surname) and persontype(persontypeid, name). Person must have a persontype and a persontype can be assigned to zero or more person records.

So I create the data model from my database and it sows up the correct linkage. I copy the persontype.name property into person and setup the mapping details so that person maps to persontype and the name property originates from persontype.name. Seems simple enough..

It won&amp;#39;t compile now though, even if I remove the persontype entity from my page. The error I get is &amp;quot;Error 3024: Problem in mapping fragment.. Must specify mapping for all key properties (Person.PersonID, Person.PersonTypeID) of the EntitySet Person

I&amp;#39;m at a loss as to where to go now, if I cant solve this issue i&amp;#39;m struggling to see the benefit in using Entity Framework over LINQ to SQL.

Thanks,
Matt</description></item></channel></rss>