How to delete object which is connected to another model with FK. ASP.NET Core MVC
There is the error: The DELETE statement conflicted with the REFERENCE constraint "FK_ShoppingCartItems_ItemsTable_ItemId". The conflict occurred in database "RandDb", table "dbo.ShoppingCartItems", column 'ItemId'. The statement has been terminated. Item public class Item : BaseEntity { [Required] [Display(Name = "Item Photo")]…