public RemoteClientEditViewModel(Guid key) { ClientRepository repository = new ClientRepository(); RemoteClient client = repository.FindRemote(key); if (client != null) { Name = client.Name; Url = client.Url; AuthenticationToken = client.AuthenticationToken; } Save = new SaveRemoteCommand(this, key); Delete = new DeleteRemoteCommand(key); }
public RemoteClientEditViewModel() { Name = "New"; Url = "http://"; Save = new SaveRemoteCommand(this, null); }