diff --git a/Webshop.Api/Program.cs b/Webshop.Api/Program.cs index 962f057..bb76208 100644 --- a/Webshop.Api/Program.cs +++ b/Webshop.Api/Program.cs @@ -181,22 +181,6 @@ using (var scope = app.Services.CreateScope()) { await userManager.AddToRoleAsync(adminUser, "Admin"); Console.WriteLine("Admin user created."); - - // Erstelle Customer-Profil für Admin (falls Admins auch Kundenprofile haben sollen) - var adminCustomerProfile = await context.Customers.FirstOrDefaultAsync(c => c.AspNetUserId == adminUser.Id); // << KORREKT: SUCHT NACH AspNetUserId >> - if (adminCustomerProfile == null) - { - adminCustomerProfile = new Webshop.Domain.Entities.Customer - { - Id = Guid.NewGuid(), - AspNetUserId = adminUser.Id, // << KORREKT: VERKNÜPFUNG ÜBER AspNetUserId >> - FirstName = "Admin", - LastName = "User" - }; - context.Customers.Add(adminCustomerProfile); - await context.SaveChangesAsync(); - Console.WriteLine("Admin's Customer profile created."); - } } else {