Пример #1
0
        public HttpResponseMessage Delete(int id)
        {
            Pet pet = repository.Pets.FirstOrDefault(u => u.Id == id);

            if (pet == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NoContent));
            }
            repository.DeletePet(pet);
            return(Request.CreateResponse(HttpStatusCode.OK, pet));
        }