public void PutMovie(int id, Movie movie)
 {
     movie.Id = id;
     if (!movieRepository.Update(movie))
     {
         throw new HttpResponseException(HttpStatusCode.NotFound);
     }
 }
 public void DeleteMovie(Movie movie)
 {
     if (movie == null)
     {
         throw new HttpResponseException(HttpStatusCode.NotFound);
     }
     movieRepository.Remove(movie);
 }
        public HttpResponseMessage PostMovie(Movie item)
        {
            item = movieRepository.Add(item);
            var response = Request.CreateResponse<Movie>(HttpStatusCode.Created, item);

            string uri = Url.Link("DefaultApi", new { id = item.Id });
            response.Headers.Location = new Uri(uri);

            return response;
        }