Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BO Design
Message
From
26/07/2010 23:17:08
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
26/07/2010 19:30:32
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01473986
Message ID:
01474074
Views:
46
>>>Just working through some ideas here, hoping that writing it out will clear it up in my head, or if not, then someone else may give me some feedback.
>>>
>>>I'm working on some software for an Insurance Company. We have Insurance Policies based on Plans and Plans have Premium Rates which vary according to smoker, age & sex of the Policy Holder and the sum assured of the Policy. For an individual Policy I need to calculate the premium due. So I'll create a CalcPremium() function on the Policy BO. Within this function I need to get the Premium Rate to use. Should I have a GetPremiumRate() function on the Policy BO which pulls the data from the Premium Rate table, or should that be on the PremiumRate BO?
>>
>>
>>Both. in your Policy BO you can instantiate the PremiumRate BO, call a method to return the premium Rate, and then finish your calculation. You should let the PremiumRate business object retrieve the data but there is no reason you can't instantiate that business object from within the first business object.
>>Tim
>
>Thanks Tim,
>
>I think that's what was bugging me: instantiating one BO within another.

Perfectly OK in my opinion. I guess it should be since I do it. :-)
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform