Model:
public class MenuItem { public Guid Id {get;set;} public virtual Guid? ParentMenuItemId {get;set;} public virtual MenuItem ParentMenuItem {get;set;} public virtual ICollection<MenuItem> ChildMenuItems {get;set;} } current mapping:
HasOptional(m => m.ParentMenuItem).WithMany(p => p.ChildMenuItems).HasForeignKey(m => m.ParentMenuItemId); I tried adding the WillCascadeOnDelete(true), but I got an error. How should I update my mapping to allow for cascading deletes? So, If I delete a Parent, all the children will be deleted. Do I have to do this manually?