I have a class which looks like below:
public string Id { get; set; } = default!;
public double? Name { get; set; } = default!;
public string? FamilyName { get; set; } = default!;
public List<Addresses> ClientAddress { get; set; } = default!;
here is my Adresses class :
public string Id { get; set; } = default!;
public string Address { get; set; } = default!;
I have found this approach on stack overflow, we use when we need to store a list in database with one to many relationship,but what i dont get is how these two tables can be connected by using the class name in the first table as a list?i dont understand how you insert into Address table for example ,anyone can help me by explaining how this works?