From aaec80d7adefc5cfe01c2b4b592fe03285caea24 Mon Sep 17 00:00:00 2001 From: "Tizian.Breuch" Date: Thu, 25 Sep 2025 16:12:45 +0200 Subject: [PATCH] adress --- Webshop.Application/Services/Customers/AddressService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Webshop.Application/Services/Customers/AddressService.cs b/Webshop.Application/Services/Customers/AddressService.cs index 8469fce..8f55da8 100644 --- a/Webshop.Application/Services/Customers/AddressService.cs +++ b/Webshop.Application/Services/Customers/AddressService.cs @@ -26,7 +26,6 @@ namespace Webshop.Application.Services.Customers var customer = await _customerRepository.GetByUserIdAsync(userId); if (customer == null) { - // If the customer profile doesn't exist for a valid user, return an empty list. return ServiceResult.Ok>(new List()); } @@ -67,8 +66,9 @@ namespace Webshop.Application.Services.Customers var newAddress = new Address { CustomerId = customer.Id, - FirstName = addressDto.FirstName ?? customer.FirstName, - LastName = addressDto.LastName ?? customer.LastName, + // << KORREKTUR: Namen vom Kundenprofil übernehmen, da sie im DTO nicht vorhanden sind. >> + FirstName = customer.FirstName, + LastName = customer.LastName, Street = addressDto.Street, HouseNumber = addressDto.HouseNumber, City = addressDto.City,