public async Task<int> DeletePersonAsync(PersonVM personVM) {
     using (HttpClientHandler handler = new HttpClientHandler { CookieContainer = new CookieContainer() }) {
         using (var httpClient = new HttpClient()) {
             var response = await httpClient.PutAsJsonAsync<PersonVM>(personBaseUri, personVM);
             await response.EnsureSuccessWithValidationSupportAsync();
             var numRowsAffected = await response.Content.ReadAsAsync<int>();
             return numRowsAffected;
         }
     }
 }
        public async Task<int> EditPersonAsync(PersonVM personVM) {
            using (HttpClientHandler handler = new HttpClientHandler { CookieContainer = new CookieContainer() }) {
                using (var httpClient = new HttpClient()) {

                    // just for testing WebAPI.ProductController ModelState.IsValid
                    //product.Name = "123";

                    var response = await httpClient.PutAsJsonAsync<PersonVM>(personBaseUri, personVM);
                    await response.EnsureSuccessWithValidationSupportAsync();
                    var numRowsAffected = await response.Content.ReadAsAsync<int>();
                    return numRowsAffected;
                }
            }
        }
 // Add AppBarButton
 private void AddPerson() {
     SelectedPersonVM = new PersonVM();
     navigationService.Navigate("AddPerson", SelectedPersonVM);
 }
 public async Task<int> DeletePersonAsync(PersonVM personVM) {
     int numRowsAffected = await personServiceProxy.DeletePersonAsync(personVM);
     return numRowsAffected;
 }