I have a list of a class that looks like this 

```
public class MyClass
{
   public ComplexType A {get;set;}
   public ComplexTypeB B {get;set;}
}

var myList = new List<MyClass>();

```

I then have a target Dto which looks like this 

```
public class MyTargetDto
{
    public ComplexType A {get;set;}
    public List<ComplexTypeB> ListOfB {get;set;}
}

```

It's very similar only that myTargetDto supports grouping by ComplexType

Given a flat list of MyClass, how can I (using Linq) convert it to a target list of MyTargetDto?