Last active
June 6, 2019 19:53
-
-
Save phillippelevidad/e36abbb9e3dde08f4380a393b3182165 to your computer and use it in GitHub Desktop.
UpdateCustomer API endpoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPut("customers")] | |
public JsonResult UpdateCustomer(Customer customer) | |
{ | |
if (ModelState.IsValid) | |
{ | |
// Consumers are able to set Customer.Level as they can do with every other property added now and in the future. | |
customerRepository.Update(customer); | |
return Ok(); | |
} | |
return BadRequest(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment