Skip to content
Discussion options

You must be logged in to vote

I put my 'main' logic in Execute method. Some of the following are examples.

  1. To make sure End Date is later than Start Date, the comparison is in Execute method.
  2. Calculate amount of 'tax' for item types. This in turn calls a command object (inside Execute method).
  3. Certain fields are required only when another property in object is 'true'.

The default is context.AddSuccessResult() but majority of our business rules call context.AddErrorResult()

context.AddOutValue is only used when you want to set value of your business property from within your business rule.

In our projects, I use a Resource file to get 'messages' for my business rules.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@oskarjf
Comment options

@Chicagoan2016
Comment options

Answer selected by oskarjf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants