I m working on MVC5 project and there's problem with related items when retrieved.
1st I've some models like:
Menu, MenuContents one-to-many related, menu has many menuContents
with different languages
public class Menu
{
public int ID { get; set; }
public virtual List<MenuContent> MenuContents {get; set;}
...
}
public class MenuContent
{
public int ID { get; set; }
public int MenuID { get; set; }
public virtual Menu Menu {get; set;}
...
}
But when I using menu object's menuContents
there's sometimes no items or sometimes not all items there.
To describe well: There's 2 contents for 1 menu. Sometimes there's only 1 item in menu's menuContents
property but sometimes it's zero or maybe 2.
Wondering what's wrong here. Furthermore missing items are so few only sometimes appears. Why are only some appearing?