These two work

```
query.OrderBy(a => a.Name).ThenBy(a => a.LastName)

```

Also works

```
query.OrderBy( a=> a.Type == 1 ? a.Name : otherTypeSortOrderColumn)

```

Similarly you can do

```
from a in query orderby a.Name,a.LastName select a;

```

and

```
From a in query orderby (a.type == 1 ? a.Name : otherTypeSortOrderColumn) select a

```

How do you mix both?

For each value of Type I want a different column sort, on which there might or might not be more columns that has to have the "ThenBy" sorting applied

Something like

```
query.OrderBy ( a => a.Type == 1 ? a.Name, A.LastName : a.Type == 2 ? a.Product.Name : ... and so on)

```