<?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 : EntityManagerDelegate</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : EntityManagerDelegate</description>
  <pubDate>Wed, 10 Jun 2026 06:40:49 -700</pubDate>
  <lastBuildDate>Fri, 16 Aug 2013 13:21:01 -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=4274</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>EntityManagerDelegate : Sorry guys, it was my code that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16738#16738</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=881" rel="nofollow">jkattestaart</a><br /><strong>Subject:</strong> 4274<br /><strong>Posted:</strong> 16-Aug-2013 at 1:21pm<br /><br />Sorry guys, it was my code that failed.<br /><br />I did set my value (which was wat i saw in de debugger), but i overlooked the rest of my code.<br /><br />But it is good to know where to put my code.<br />]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 13:21:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16738#16738</guid>
  </item> 
  <item>
   <title>EntityManagerDelegate : Tried also to set the values directly. When...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16733#16733</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=881" rel="nofollow">jkattestaart</a><br /><strong>Subject:</strong> 4274<br /><strong>Posted:</strong> 16-Aug-2013 at 9:56am<br /><br />Tried also to set the values directly.<br />When i debug the values seem to be ok.<br /><br />I will try marks suggestion also.<br /><br />thanks.<br />]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 09:56:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16733#16733</guid>
  </item> 
  <item>
   <title>EntityManagerDelegate : Not sure at the moment what&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16732#16732</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 4274<br /><strong>Posted:</strong> 16-Aug-2013 at 8:19am<br /><br />Not sure at the moment what's going on. Try these. Instead of calling SetValue, why don't you just assign the due data? reminder.Due = due. That should already set the entity to modified, so then you can skip the call to SetModified. Set a breakpoint and make sure the Due data was actually changed and that the entity is in modified state.<div><br></div><div>Marks suggestion is also a good. This doesn't necessarily have to be done on the client.</div>]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 08:19:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16732#16732</guid>
  </item> 
  <item>
   <title>EntityManagerDelegate : Would this logic not be better...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16731#16731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 4274<br /><strong>Posted:</strong> 16-Aug-2013 at 7:50am<br /><br />Would this logic not be better on the server than on the client? In the SaveInterceptor on the ExecuteSave you could execute this logic then call base.ExecuteSave() and it should work.]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 07:50:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16731#16731</guid>
  </item> 
  <item>
   <title>EntityManagerDelegate : Marcel,  I want to update a related...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16729#16729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=881" rel="nofollow">jkattestaart</a><br /><strong>Subject:</strong> 4274<br /><strong>Posted:</strong> 16-Aug-2013 at 3:00am<br /><br />Marcel,<br /><br />I want to update a related entity on saving.<br /><br />This is the code (just after the assign of then<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var entity = args.Entities.OfType&lt;Booking&gt;()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .FirstOrDefault(e =&gt; e.EntityAspect.EntityState.IsAddedOrModified());<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (entity != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UpdateBookingReminders(entity, args);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void UpdateBookingReminders(Booking booking, EntitySavingEventArgs args)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var payments = booking.BookingPayments;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BookingPayment payment;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (var reminder in booking.BookingReminders)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (reminder.Milestone == "DEPARTURE")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var due = booking.departure.AddDays(reminder.offset);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reminder.SetValue("Due", due);&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;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;args.Entities.Add(reminder);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reminder.EntityAspect.SetModified();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />But is doesn't seem to update anything. What am i doing wrong.<br /><br />BTW i am using cocktail 1.0<span style="font-size:10px"><br /><br />Edited by jkattestaart - 16-Aug-2013 at 4:30am</span>]]>
   </description>
   <pubDate>Fri, 16 Aug 2013 03:00:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4274&amp;PID=16729#16729</guid>
  </item> 
 </channel>
</rss>