Skip to content

CommandBase should be the same as BusinessBase... Only different :) #3248

Discussion options

You must be logged in to vote

Keep in mind that the primary purpose of BusinessBase is to help you create a class that includes the full rules engine.

The data portal does treat CommandBase types differently from other types in terms of the ExecuteAsync method. Looking back, perhaps that wasn't the best design decision, but there's a (I think) reasonable solution.

What I do in this sort of situation is to use a BusinessBase subclass to collect and validate user input, then have a CommandBase subclass that contains the editable object to execute the command. Something like this:

[Serializable]
public class UserInput : BusinessBase<UserInput>
{
    // implement properties and rules

    // don't implement any data porta…

Replies: 2 comments 3 replies

Comment options

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

@Chicagoan2016
Comment options

Comment options

You must be logged in to vote
1 reply
@lwmorris067
Comment options

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