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