<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Adding Entity via Many To Many No Payload</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Adding Entity via Many To Many No Payload</description>
  <pubDate>Wed, 13 May 2026 15:07:26 -700</pubDate>
  <lastBuildDate>Thu, 17 Nov 2011 12:51:25 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3091</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Adding Entity via Many To Many No Payload : Hi Denis,  I tried this again,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12076#12076</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=579" rel="nofollow">gregweb</a><br /><strong>Subject:</strong> 3091<br /><strong>Posted:</strong> 17-Nov-2011 at 12:51pm<br /><br />Hi Denis,<br /><br />I tried this again, and you are correct - it is working - I was looking at the right table, but the record was inserted at the top of the table instead of the bottom where I was looking for it.  Not sure why, but no matter, it is indeed working properly.<br /><br />Greg]]>
   </description>
   <pubDate>Thu, 17 Nov 2011 12:51:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12076#12076</guid>
  </item> 
  <item>
   <title>Adding Entity via Many To Many No Payload : Hi Greg;I just tested the sample...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12072#12072</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3091<br /><strong>Posted:</strong> 16-Nov-2011 at 9:40am<br /><br />Hi Greg;<div><br></div><div>I just tested the sample and was able to see the many-to-many records added and deleted appropriately on the mapping table. The mapping table is EmployeeTerritoryNoPayload, and not EmployeeTerritory. Could you confirm that you were looking at the right mapping table?</div>]]>
   </description>
   <pubDate>Wed, 16 Nov 2011 09:40:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12072#12072</guid>
  </item> 
  <item>
   <title>Adding Entity via Many To Many No Payload : Note that I did get this working...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12046#12046</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=579" rel="nofollow">gregweb</a><br /><strong>Subject:</strong> 3091<br /><strong>Posted:</strong> 13-Nov-2011 at 11:15am<br /><br />Note that I did get this working by using a Payload and intermediate entity and creating it manually.  This works for me, so it's not an issue at this time.<br /><br />Greg]]>
   </description>
   <pubDate>Sun, 13 Nov 2011 11:15:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12046#12046</guid>
  </item> 
  <item>
   <title>Adding Entity via Many To Many No Payload : I have a many to many with no...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12045#12045</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=579" rel="nofollow">gregweb</a><br /><strong>Subject:</strong> 3091<br /><strong>Posted:</strong> 13-Nov-2011 at 9:39am<br /><br />I have a many to many with no payload set up. The Navigation properties show up just fine in the EDMX, and all displays correctly in the gui if I manually create the records and association record in the db.<br /><br />The data setup is&nbsp;&nbsp;&nbsp;Contacts --&gt; ContactCompany &lt;-- Company<br /><br />All of this works fine until I try to add a company in code.  The company entity is created and saved, but no record is created in the ContactCompany table, so the association is not created.<br /><br />I downloaded and tried the ManyToMany No Payload sample.  It has a function in it where it creates a new Territory and it associates it with an employee.  I modified it to SaveChanges() to see if that works, but it does not seem to actually create the many to many record. It does create the Territory Entity, but the association is lost.  So it appears there is a bug in this sample.<br /><br />This is my code:<br /><br /><br />CompanyEntity newEntity = new CompanyEntity(this.SelectedContact.OwnedBy);<br />this.ContactEntityManager.AddEntity(newEntity);<br />this.SelectedContact.CompanyEntities.Add(newEntity);<br />this.ContactEntityManager.SaveChangesAsync();<br /><br />Note this is NOT using codefirst, just the regular edmx.<br /><br />Greg]]>
   </description>
   <pubDate>Sun, 13 Nov 2011 09:39:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3091&amp;PID=12045#12045</guid>
  </item> 
 </channel>
</rss>