Beispiel #1
0
 // POST api/<controller>
 public void Post(CatModel cat)
 {
     if (cat != null)
     {
         bool?ret = CatModel.Create(cat);
         if (ret == null)
         {
             throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Error creating your cat."));
         }
     }
 }