public ClientPrimitive CreateClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory)
 {
     var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory);
       viewModel.Client = new ClientPrimitive();
       viewModel.DialogMode = DialogMode.Create;
       ModalDialogHelper<UpdateClient>.ShowDialog(viewModel);
       if (!viewModel.IsCanceled)
       {
     return viewModel.Client;
       }
       return null;
 }
 public ClientPrimitive EditClient(IModalDialogService modalDialogService, IServiceFactory serviceFactory, ClientPrimitive client)
 {
     var viewModel = new UpdateClientViewModel(modalDialogService, serviceFactory);
       viewModel.Client = client;
       viewModel.DialogMode = DialogMode.Update;
       ModalDialogHelper<UpdateClient>.ShowDialog(viewModel);
       return viewModel.Client;
 }