2
I have a table Menu that may have many Categories and these Categories may have only one 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 one Menu without having to delete the Categories related. What options do I have to solve this problem?