title: I want to get the new ID when new record is created using web API and angular resource
body: <p>I am using Web API and Angular Resource to manage my application..
  When Using the Save method in my controller I want to receive the new saved record ID...</p>
  
  <p>My web API method returns the new ID in the response Created Message.. But I am unable to read it...</p>
  
  <p>here is my service:</p>
  
  <pre><code>'use strict';
  appServices.factory('projectsService', function ($resource, ngAuthSettings) {
      var serviceBase = ngAuthSettings.apiServiceBaseUri;
      return $resource(serviceBase + '/api/project/:id', {}, {
          get: { method: 'GET', params: { id: '' }, isArray: true },
          getById: { method: 'GET', params: { id: '0' }, isArray: false },
          save: { method: 'POST' ,isArray: false},
          update: { method: 'PUT' },
          remove: { method: 'DELETE' }
      });
  });
  </code></pre>
  
  <p>and here is my controller method:</p>
  
  <pre><code> $scope.save = function ($event) {
  
          $event.preventDefault();
  
          $('#AddProjectForm').parsley().validate();
          if ($('#AddProjectForm').parsley().isValid() ) {
  //HEre is my save method
              projectsService.save($scope.project).$promise.then(function (newid) {
      $location.path('/project/' + newid);
           },
               function (response) {
  
                   $scope.message = "Failed to register user due to:" + errors.join(' ');
               });
          }
      };
  </code></pre>
  
  <p>and In my web API this is the return </p>
  
  <pre><code>HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, projectRepository.NewID);
                  return response;
  </code></pre>
  
  <p>Any Idea??</p>