<?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 : Validation on Save</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Validation on Save</description>
  <pubDate>Wed, 15 Apr 2026 19:09:49 -700</pubDate>
  <lastBuildDate>Thu, 03 Jan 2013 10:17:38 -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=3866</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>Validation on Save : Ok, I got it.I&amp;#039;d like to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15487#15487</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1485" rel="nofollow">cefernan</a><br /><strong>Subject:</strong> 3866<br /><strong>Posted:</strong> 03-Jan-2013 at 10:17am<br /><br /><div><div>Ok, I got it.</div><div><br></div><div>I'd like to put this business logic in the DomainModel to be possible to others plataforms (through OData) consist the same logic.&nbsp;</div><div><br></div><div>I'll do in my DomainService and if necessary I'll replicate the code.</div><div><br></div><div>Thanks Marcel.</div></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 03 Jan 2013 10:17:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15487#15487</guid>
  </item> 
  <item>
   <title>Validation on Save : This kind of logic should go into...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15485#15485</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> 3866<br /><strong>Posted:</strong> 02-Jan-2013 at 6:18pm<br /><br />This kind of logic should go into a domain service as part of your unit of work as illustrated here in the context of Cocktail.<div><br></div><div><a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/unit-of-work-pattern-and-persistence-ignorance#HDomainService" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/unit-of-work-pattern-and-persistence-ignorance#HDomainService</a></div><div><br></div><div>You can then call it from a ViewModel before you do the save, or you could even override the CommitAsync method of your unit of work to make sure the logic is executed as part of every commit.</div>]]>
   </description>
   <pubDate>Wed, 02 Jan 2013 18:18:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15485#15485</guid>
  </item> 
  <item>
   <title>Validation on Save : I have two entities in my database...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15481#15481</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1485" rel="nofollow">cefernan</a><br /><strong>Subject:</strong> 3866<br /><strong>Posted:</strong> 02-Jan-2013 at 12:39pm<br /><br /><div>I have two entities in my database that are responsible to control the application access. The structure of "levels" is&nbsp;hierarchical and a specific level never has more rights than your parent.</div><div><br></div><div>AccessLevel&nbsp;</div><div>----------------</div><div>AccessLevelID</div><div>Name</div><div>AccessLevelParentID&nbsp;</div><div><br></div><div><br></div><div>AccessLevelRight</div><div>----------------</div><div>AccessLevelID</div><div>ActionID</div><div><br></div><div>When I remove a right from a parent, I need to remove this right (if exist) for all children of this level.</div><div>&nbsp;</div><div>So, I need to create a kind of validation to assert this business logic.&nbsp;</div><div><br></div><div>I thought to do this creating a validation in an entity partial class:</div><div><font color="#0000ff">public override void </font>Validate(IdeaBlade.Validation.<font color="#009999">VerifierResultCollection </font>validationErrors)</div><div><br></div><div>But, in this validation, I need to execute a query and manipulate some data. I don't have an entity manager in that scope.</div><div>I can solve my problem creating a trigger in the database, but I don't want to do this.</div><div><br></div><div>How can I do it?</div>]]>
   </description>
   <pubDate>Wed, 02 Jan 2013 12:39:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3866&amp;PID=15481#15481</guid>
  </item> 
 </channel>
</rss>