public async Task <ActionResult <ShippingAddressDetail_ShippingAddressDTO> > Update([FromBody] ShippingAddressDetail_ShippingAddressDTO ShippingAddressDetail_ShippingAddressDTO) { if (!ModelState.IsValid) { throw new MessageException(ModelState); } ShippingAddress ShippingAddress = ConvertDTOToEntity(ShippingAddressDetail_ShippingAddressDTO); ShippingAddress = await ShippingAddressService.Update(ShippingAddress); ShippingAddressDetail_ShippingAddressDTO = new ShippingAddressDetail_ShippingAddressDTO(ShippingAddress); if (ShippingAddress.IsValidated) { return(ShippingAddressDetail_ShippingAddressDTO); } else { return(BadRequest(ShippingAddressDetail_ShippingAddressDTO)); } }