There are a couple of things you can do. IN general, however, I find it
easiest to throw exceptions up to the UI for problems and then parse the
exception there. It is very specific and does not require passing back
values.
Of course, you can also use enums.
public MyEnum TestValidation()
{
if(failedOneValidation())
return MyEnum.FailedOneValidation;
if(failedTwoValidation())
return MyEnum.FailedTwoValidation;
}
But, this is harder if you embed it down levels, which often happens in
tiered approaches. Exceptions can bubble all the way to the UI and be
handled there.
To make sure these validations are logged, you can use the new policy
injection block (part of EntLib 3.1). Then you can turn on or off items by
config.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
<ha******@hotmail.comwrote in message
news:11*********************@l70g2000hse.googlegro ups.com...
Hi,
I'd like to know if anyone knows of any resources detailing the best
practices of validating rules in the business tier and providing
helpful error messages to users in the UI tier. All the information I
have come across seems to revolve around using validation controls on
the webpages themselves, which is not always feasible.
Regards,
Chris