Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created November 20, 2009 02:04
Show Gist options
  • Save jfromaniello/239221 to your computer and use it in GitHub Desktop.
Save jfromaniello/239221 to your computer and use it in GitHub Desktop.
private ICommand CreateCommand(DAOAction action)
{
if(action != DAOAction.Insert)
{
return new RelayCommand<IFormViewModel<T>>(vm =>
{
vm.Action = action;
OnRequestOpenNew(vm);
},
vm => vm != null);
}
return new RelayCommand<IFormViewModel<T>>(v =>
{
var vm = (IFormViewModel<T>)GetNewEntityFormVM();
vm.Action = action;
OnRequestOpenNew(vm);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment