title: Web api Delete method input object parameter is null
body: <p>Inside my WebAPI asp.net mvc controller Delete method, the passed in object called contact is coming out to be null. I have checked my code every where and I can not figure out the root cause. I have edit operation working successfully in a very similar fashion. </p>
  
  <p><strong>So what is causing the contact object parameter inside the webapi asp.net method to come in as null value?</strong> </p>
  
  <p>I have checked as shown in diagram that the contact object inside the angular controller is not null before being passed into the webapi delete method.</p>
  
  <p><img src="https://i.stack.imgur.com/dqi0f.png" alt="enter image description here"></p>
  
  <pre><code>Here is my rest of the code 
  
    &lt;div data-ng-controller="ContactDeleteController"&gt;
          &lt;form name ="deleteContact" data-ng-submit="saveDeleteContact()"&gt;
              &lt;div&gt;
                  &lt;label&gt;First Name: &lt;/label&gt;
                  &lt;input required type="text" placeholder="Enter First Name" data-ng-model="contact.FirstName"/&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Last Name: &lt;/label&gt;
                  &lt;input required type="text" placeholder="Enter Last Name" data-ng-model="contact.LastName"/&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Email Address: &lt;/label&gt;
                  &lt;input required type="text" placeholder="Enter Email Address" data-ng-model="contact.EmailAddress"/&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;label&gt;Cell Phone Number: &lt;/label&gt;
                  &lt;input required type="text" placeholder="Enter Phone Number" data-ng-model="contact.PhoneNumber"/&gt;
              &lt;/div&gt;
              &lt;div&gt;&lt;/div&gt;
              &lt;div&gt;
                  &lt;button class="btn btn-primary" type="submit"&gt;Delete&lt;/button&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  
  
  
      var ContactDeleteController = function ($scope, $http, $location) {
          var contactId = $location.absUrl().match(/\/Delete\/(.*)/)[1];
          $http.get("/api/ContactWeb/" + contactId)
              .then(function (response) {
                  $scope.contact = response.data;
              });
  
          $scope.saveDeleteContact = function () {
              var con = $scope.contact;
              $http.delete("/api/ContactWeb", con)
                  .then(function (response) {
                      $scope.contact = response.data;
                  });
              window.location = "/Contact/Index";
          };
      };
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/dpKGm.png" alt="enter image description here"></p>