Question: I am trying to populate a `List<Dock>` when `Profile.MatchId == Dock.MatchId` from different classes.

This is a stripped down version of both classes:

```
public class Profile
{
  [Key]
  [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  public int ProfileId { get; set; }
  public int MatchId { get; set; }

  public virtual List<Dock> Docks { get; set; } = new List<Dock>();
}

public class Dock
{
  [Key]
  [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  public int DockId { get; set; }
  public int MatchId { get; set; }
}

```

How do I get the `List<Dock> Docks` navigation properties to correctly populate? I am believe I need to wire this up via `modelBuilder` - however have not done this before.

Answer: 
You are redefining the `i` variable here:

```
var i=document.createElement("i");

```
Beside the double use of `i`, it's now `j`, you need to append the nodes in the right order to get an `<ul>` with the right children `<li>`.

```
<ul id="menu_bar">
    <li><a href="#"><i class="icon mdi mdi-home"><span>Electrical calulator</span></i></a></li>
    <li><a href="#"><i class="icon mdi mdi-home"><span>Light Calulator</span></i></a></li>
    <li><a href="#"><i class="icon mdi mdi-home"><span>Finance Calculator</span></i></a></li>
    <li><a href="#"><i class="icon mdi mdi-home"><span>temperature calculator</span></i></a></li>
</ul>

```

```js
var menu = ["Electrical calulator", "Light Calulator", "Finance Calculator", "temperature calculator"],
    j,
    li, a, i, span;

for (j = 0; j < menu.length; j++) {
    li = document.createElement("li");

    a = document.createElement("a");
    a.href= '#';
    i = document.createElement("i");
    span = document.createElement("span");

    i.className = "icon mdi mdi-home";

    span.innerHTML = menu[j];
    i.appendChild(span);
    a.appendChild(i);
    li.appendChild(a);
    document.getElementById('menu_bar').appendChild(li);
}
```

```html
<ul id="menu_bar"></ul>
```