protected override void Edit() { UserDTO selectedDto = Service.GetUserById(SelectedItem.Id); UserDetailViewModel detailModelView = new UserDetailViewModel(selectedDto, false); if (NavigationService.NavigateTo("Detail", detailModelView) == NavigationResult.Ok) { Load(); SelectedItem = Items.SingleOrDefault(dto => dto.Id == selectedDto.Id); } }
protected override void New() { UserDTO newUser = new UserDTO(); UserDetailViewModel detailModelView = new UserDetailViewModel(newUser, true); if (NavigationService.NavigateTo("Detail", detailModelView) == NavigationResult.Ok) { Load(); SelectedItem = Items.SingleOrDefault(dto => dto.Id == newUser.Id); } }