Assuming you call down to some DAL to get your entity. Instead of the DAL returning your entity directly, it could return a "DataLoadResult" object. With properties to indicate success/failure of loadingobject, and a property that contains the loaded entity (on a successful load). You could also include timing information, and performance metrics in the object (as an extension).
calling code checks the "LoadSuccess" property before it tries to read the actual entity off the DataLoadResult object. -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Shane Courtrille Sent: Friday, May 11, 2007 5:33 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Loading Entities & Reporting Problems I've been working with loading entities from databases lately. One of the problems you sometimes run into is an entry that can't be loaded properly. For some reason or other some of the data associated with it is bad. Now at this point you could throw an exception but you might not want to interrupt the loading. Instead you may want to load the item up and somehow pass up a notification that there was a problem. I've been thinking of notification sets as used in business rule systems and if that was something that could be used. So my question to everyone is how have they dealt with this problem? Does anyone have a cool/interesting system that deals with loading entities which deals with problems while still allowing the loading of the entity? Thanks, Shane =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com