I have a table Menu
which can have many Categories
and these Categories
can only have a Menu
:
public class Menu
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Category> Categories { get; set; }
}
public class Category
{
public int Id { get; set; }
public string Name { get; set; }
public virtual Menu Menu { get; set; }
}
I want to be able to delete a Menu
without having to delete the Categories
related. What options do I have to resolve this problem?