This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using LiteCharms.Features.Shop.Products.Entities;
|
||||
|
||||
namespace LiteCharms.Features.Shop.ShoppingCarts.Entities;
|
||||
namespace LiteCharms.Features.Shop.ShoppingCarts.Entities;
|
||||
|
||||
public class ShoppingCartItemConfiguration : IEntityTypeConfiguration<ShoppingCartItem>
|
||||
{
|
||||
@@ -15,13 +13,13 @@ public class ShoppingCartItemConfiguration : IEntityTypeConfiguration<ShoppingCa
|
||||
builder.Property(f => f.ShoppingCartId).IsRequired();
|
||||
builder.Property(f => f.ProductPriceId).IsRequired();
|
||||
|
||||
builder.HasOne<ShoppingCart>()
|
||||
builder.HasOne(f => f.ShoppingCart)
|
||||
.WithMany(s => s.ShoppingCartItems)
|
||||
.HasForeignKey(f => f.ShoppingCartId)
|
||||
.IsRequired()
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
builder.HasOne<ProductPrice>()
|
||||
builder.HasOne(f => f.ProductPrice)
|
||||
.WithMany()
|
||||
.HasForeignKey(f => f.ProductPriceId)
|
||||
.IsRequired()
|
||||
|
||||
Reference in New Issue
Block a user