I have written a Core 2.1 API that I'm attempting to retrieve the child test type information for a test.

Here is the parent TestInfo model class:

```
 public partial class TestInfo
{

    public int TestId { get; set; }
    public string TestShortDescription { get; set; }
    public string TestLongDescription { get; set; }
    public int TestTypeId { get; set; }
    public int? TestLimitsId { get; set; }
    public ICollection<TestTypeInfo> TestTypeInfos { get; set; }
}

```

Here is the child TestTypeInfo model class:

```
public partial class TestTypeInfo
{
    [ForeignKey("TestInfo")]
    public int TestTypeId { get; set; }
    public string TestTypeShortDescription { get; set; }
    public string TestTypeLongDescription { get; set; }
    public TestInfo TestInfo { get; set; }
}

```

Here is my controller code. I'm doing an include to pull in the test type info. I have the wrong syntax and could use some help... 

```
[HttpGet]
    public IEnumerable<TestInfo> GetTestInfo()
    {
        var testinfo = _context.TestInfo.Include(t => t.TestTypeInfos);
        return _context.TestInfo.Include(t => t.TestTypeInfos).ToList();
    }

```

The problem is that the test type info being returned is based on the TestInfo TestID rather than the TestInfo TestTypeID. Please see the image below. Can someone tell me how to return the test type info based on the TestInfo TestTypeID of the test. 

[![enter image description here](https://i.stack.imgur.com/MmWSK.png)](https://i.stack.imgur.com/MmWSK.png)