// methods public bool Handle(RequestBase request, Commands command) { bool retval = false; switch (command) { case Commands.NoOp: break; case Commands.Submit: retval = request.Submit(); break; case Commands.Cancel: retval = request.Cancel(); break; case Commands.Confirm: retval = request.Confirm(); break; case Commands.Approve: retval = request.Approve(); break; case Commands.Disapprove: retval = request.Disapprove(); break; case Commands.Conclude: retval = request.Conclude(); break; case Commands.Remove: retval = request.Remove(); break; } if (retval == true) { // inform interested parties like database RaiseCommandHandledEvent( request, command); } return retval; }