In my last company, on handling view commands, in the ViewModelBase there were one central command implemented, like

```
public ICommand ToolCommand { get; set; }

```

And in the ViewModelBase, it's been initialized, and all buttons hooked to this Command were differentiated by its Command Parameter:

```
public ViewModelBase()
{
    ToolCommand = new RelayCommand<String>(Execute, CanExecute);
}

```

In the view model base, the Execute and CanExecute functions were virtual (implementing such generic commands like Close, and so on), and in the derived classes, the Execute and CanExecute function was a big switch, extending base functionality, looked more or less like this:

```
public void Execute(String parameter)
{
    switch (parameter)
    {
        case "Refresh":
          RefreshGrid();
          break;
        case "OtherStuff":
          Other();
          break;
        default:
          base.Execute(parameter);
    }
}

```

In these cases, when we just added a button, we added another switch case in the proper view models.

However in my current company, the rule is that each button has specific command property, like

```
public ICommand RefreshCommand { get; set; }
public ICommand OtherStuffCommand { get; set; }

```

, and initiated one-by-one:

```
RefreshCommand = new RelayCommand<String>(RefreshGrid(), _canRefresh);
OtherStuffCommand = new RelayCommand<String>(OtherStuff(), _canDoOther);

```

In the office we can't agree which is better in terms of compactness, beauty, debuggability. Surely we won't rewrite working parts because of its cost, but considering new projects we find hard to discuss which has more advantages.

Which and why of these two approaches is better?