I have a domain class like
public class Category
{
[Key]
public string IdCategory { get; set; }
public string Name { get; set; }
public List<Category> Children { get; set; }
public List<Product> Products { get; set; }
public Category()
{
Products = new List<Product>();
Children = new List<Category>();
}
}
In the generated code I find the products collection, but not the children collection. There are some restriction about using the same class? There is another way to modeling this relation without recurring to keys?
1 Answer