I have the class:

```
public class DataModel {
  public int X { get; set; }
  public int Y { get; set; }
}

```

And the following list:

```
var data = new List<DataModel>();
data = service.GetData();

```

I need to change the List to a List:

```
public class NewDataModel {
  public int[] XValues { get; set; }
  public int[] YValues { get; set; }
}

```

So XValues are all the X Values in the original list ... The same with YValues.

How can I do this with Linq?

Thank You,
Miguel