public IHttpActionResult PostCustomer(Customer customer) { db.approve_account(customer.service_ref_no); //if (!ModelState.IsValid) //{ // return BadRequest(ModelState); //} //db.Customers.Add(customer); //try //{ // db.SaveChanges(); //} //catch (DbUpdateException) //{ // if (CustomerExists(customer.service_ref_no)) // { // return Conflict(); // } // else // { // throw; // } //} return(CreatedAtRoute("DefaultApi", new { id = customer.service_ref_no }, customer)); }