I have model Category:
public class Category
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
I want to create a new model DependencyCategory something like this to store many to many child parent relationship.
public class DependencyCategory
{
public int Id { get; set; }
public Category Child { get; set; }
public Category Parent { get; set; }
}
How to create now relationship with ICollection<DependencyCategory>
Children, Parent in Category model? I want for example when access a category parent to see all children or if is child to see all parent available.