<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.lhotka.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>Search results matching tags 'Data portal' and 'Exceptions'</title><link>http://forums.lhotka.net/search/SearchResults.aspx?a=0&amp;o=DateDescending&amp;tag=Data+portal,Exceptions&amp;orTags=0</link><description>Search results matching tags 'Data portal' and 'Exceptions'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP3 (Build: 36.8414)</generator><item><title>Customize Authorization Rules Messages.</title><link>http://forums.lhotka.net/forums/p/10773/50254.aspx#50254</link><pubDate>Fri, 14 Oct 2011 18:40:24 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:50254</guid><dc:creator>omarcusido</dc:creator><description>&lt;p&gt;Hello all. I&amp;#39;m using Authorization Rules in my Business Objects but when any Authorization Rule is broken the message provided on the exception do not fits my needs. I was reviewing the implementation of the DataPortal class and CSLA throws a Security Exception and loads the exception message from a resource. I really wanted to know if there&amp;#39;s a way to change that message to a customized dynamically created message without modify my DataPortal class, I also can&amp;#39;t write directly in the resource file because the message is not always the same.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;OCP.&lt;/p&gt;</description></item><item><title>Re: DataPortal_Insert Cancel</title><link>http://forums.lhotka.net/forums/p/8637/41088.aspx#41088</link><pubDate>Wed, 10 Mar 2010 14:06:28 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41088</guid><dc:creator>ajj3085</dc:creator><description>&lt;p&gt;Well you wouldn&amp;#39;t throw&amp;nbsp; a DataPortalException;&amp;nbsp; create your own exception like NoMoreKeysException.&lt;/p&gt;
&lt;p&gt;Although the handler you have should be working, although there is Csla.DataPortalException and Csla.Server.DataPortalException.&amp;nbsp; Perhaps you&amp;#39;re throwing the one in the server namespace (b/c you have using Csla.Server for some reason) and on your UI side you have a using Csla;&lt;/p&gt;
&lt;p&gt;Either way still make your own specific exception :-)&lt;/p&gt;</description></item><item><title>Re: DataPortal_Insert Cancel</title><link>http://forums.lhotka.net/forums/p/8637/41086.aspx#41086</link><pubDate>Wed, 10 Mar 2010 13:27:22 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41086</guid><dc:creator>ajj3085</dc:creator><description>&lt;p&gt;Well, throwing an exception is probably your best bet.&amp;nbsp; If you don&amp;#39;t want the UI to handle a DataPortalException, and instead handle your specific exception, you can override your Save method and throw the BusinessException from the DataPortalException.&lt;/p&gt;</description></item><item><title>DataPortal_Insert Cancel</title><link>http://forums.lhotka.net/forums/p/8637/41085.aspx#41085</link><pubDate>Wed, 10 Mar 2010 12:17:15 GMT</pubDate><guid isPermaLink="false">49a2225a-bd1e-4c5d-a665-720b81e87ca9:41085</guid><dc:creator>Imker</dc:creator><description>&lt;p&gt;in&amp;nbsp;DataPortal_Insert I use a stored procedure to get&lt;/p&gt;
&lt;p&gt;the next free key to assign to my BusinessObject when beeing inserted into the&lt;/p&gt;
&lt;p&gt;database. As the key generation saves the used key to the database, I would prefer not to&lt;/p&gt;
&lt;p&gt;get the key prior to&amp;nbsp;&lt;span style="font-size:10px;"&gt;DataPortal_Insert.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.6667px;"&gt;What would be the best way to communicate back and cancel the insertion, when no more keys&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;are available?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.6667px;"&gt;I tried to throw an expection, but then I got a DataPortalException was unhandled by user code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.6667px;"&gt;Thanks for an ideas and hints.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.6667px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>