コード例 #1
0
 public IHttpActionResult PostCustomer(Customer customer)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     cc.CreateOneCustomer(customer);
     return(CreatedAtRoute("DefaultApi", new { id = customer.Id }, customer));
 }