Simple method with no data access, still create a BO?Simple method with no data access, still create a BO?
Old forum URL: forums.lhotka.net/forums/t/2384.aspx
rhinoishere posted on Monday, February 19, 2007
What is the proper way to handle simple methods where there is no need for data access?
Do you create a command object to wrap each of those simple methods, OR is it okay to have a "CommonMethods" class where you could have methods that don't access the data and return something like an integer that would be used directly from the UI?
thanks, Ryan
Skafa replied on Monday, February 19, 2007
If there is no need to run the code on the remote you can just write plain old methods. if you dó want it to be ran on the remote side, you'll have to use CommandBase
Remco
ajj3085 replied on Tuesday, February 20, 2007
A normal business object is still probably the best way to go. I assume the object in question still fulfills something as part of a use case, and still must enforce rules and possibly have security checks.
Save might not make much sense... so you may just override it and throw an InvalidMethodException or similar.
Copyright (c) Marimer LLC