public IActionResult Put([FromQuery] API.AddressApiModel _updateAddress) { if (ModelState.IsValid && _addressHelper.Put(_updateAddress.ConvertToEntity())) { return(Ok("Successfully updated address")); } return(NotFound("Unable to update address")); }
public IActionResult Post([FromQuery] API.AddressApiModel _newAddress) { if (ModelState.IsValid && _addressHelper.Post(_newAddress.ConvertToEntity())) { return(Ok("Address was sucessfully added")); } return(NotFound("Could not add the given address")); }