I'm using code first. I'm trying to implement many to many relationship in Asp.net core with .Net 6.
my Order Model:
...
...
public virtual ICollection<Product> Products { get; set; }
my Product Model:
...
...
public virtual ICollection<Order> Orders { get; set; }
When I was trying to update database got this error:
Introducing FOREIGN KEY constraint 'FK_ProductOrder_Orders_OrdersID' on table 'ProductOrder' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.