This commit is contained in:
Tizian.Breuch
2025-08-01 10:06:00 +02:00
parent 8a4590ee5a
commit 6f86d0de87
15 changed files with 79 additions and 79 deletions

View File

@@ -14,7 +14,7 @@ namespace Webshop.Infrastructure.Data
public DbSet<Product> Products { get; set; } = default!;
public DbSet<ProductVariant> ProductVariants { get; set; } = default!;
public DbSet<Category> Categories { get; set; } = default!;
public DbSet<Category> categorys { get; set; } = default!;
public DbSet<Customer> Customers { get; set; } = default!;
public DbSet<Address> Addresses { get; set; } = default!;
public DbSet<Order> Orders { get; set; } = default!;
@@ -26,7 +26,7 @@ namespace Webshop.Infrastructure.Data
public DbSet<PaymentMethod> PaymentMethods { get; set; } = default!;
public DbSet<Setting> Settings { get; set; } = default!;
public DbSet<ProductCategory> ProductCategories { get; set; } = default!;
public DbSet<ProductCategory> Productcategorys { get; set; } = default!;
public DbSet<ProductDiscount> ProductDiscounts { get; set; } = default!;
public DbSet<CategoryDiscount> CategoryDiscounts { get; set; } = default!;
@@ -101,7 +101,7 @@ namespace Webshop.Infrastructure.Data
modelBuilder.Entity<Category>()
.HasOne(c => c.ParentCategory)
.WithMany(c => c.SubCategories)
.WithMany(c => c.Subcategorys)
.HasForeignKey(c => c.ParentCategoryId)
.OnDelete(DeleteBehavior.Restrict);