I do apologise if this has been asked before. I'm trying to research but I also don't know what I'm supposed to search, sorry. So I'm trying to get the Parent and Child to link together on my project. What I have is this:
public class ParentDb
{
public int Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
}
public class ChildDb
{
public int Id { get; set }
public string FirstName { get; set; }
public string LastName { get; set; }
}
I assume I'm supposed to do something like:
public List<ChildDb> Children { get; set; }
I'm clueless on how I can make it so when I add to my ChildDb using the controller, it'll also add to the list of the parent when I get all parents(and child).
Sorry again if it's been asked before or I'm an idiot. I'm trying, I just don't know what I'm looking for.