// DELETE: api/Person/5
        public HttpResponseMessage Delete(int id)
        {
            bool successfullDelete = humanDBHelper.DeletePerson(id);
            HttpResponseMessage response;

            if (successfullDelete)
            {
                response = Request.CreateResponse(HttpStatusCode.NoContent);
            }
            else
            {
                response = Request.CreateResponse(HttpStatusCode.NotFound);
            }
            return(response);
        }
Esempio n. 2
0
 public bool DeletePerson(Person person)
 {
     return(humanDBHelper.DeletePerson(person));
 }