I am using C#'s MVC 4 API and Entity Framework 4 with auto generated Models and Controllers.
I have a parent-child relationship that I am serializing to JSON.
My relations are serialized just fine but I would like to show only the ids of the nested children instead of the whole objects.

This is the JSON response I am currently getting.

```
[{
    "ID": 1,
    "NAME": "PARENT1",
    "CHILDREN": [{
        "ID": "1",
        "NAME": "CHILD1"
    },{
        "ID": "2",
        "NAME": "CHILD2"
    }]
}]

```

And this is what I'd like to get.

```
[{
    "ID": 1,
    "NAME": "PARENT1",
    "CHILDREN": [1,2]
}]

```

These are kinda the models I am using.

```
public partial class PARENT
{
    public PARENT()
    {
        this.CHILDREN = new List<CHILD>();
    }

    public int ID { get; set; }
    public string NAME { get; set; }
    public virtual ICollection<CHILD> CHILDREN { get; set; }
}

public partial class CHILD
{
    public CHILD(){}

    public int ID { get; set; }
    public string NAME { get; set; }
    public int PARENT_ID { get; set; }
}

```

My controller method.

```
// GET api/Parents
public IEnumerable<PARENT> GetPARENTs()
{
    return db.PARENTS.AsEnumerable();
}

```

Any help would be greatly appreciated since I am not sure what I should be looking for.
I'm fairly new to EF and .NET's MVC and this seems like something that should be pretty easy to do.

Thank you all very much in advance.! :)