So it seems that Model Binding doesn't handle sorting Navigation Properties (Foreign Keys) out of the box. I found the following which is what I used to solve this problem: ASP.Net 4.5 Model Binding Sorting By Navigation Property
So this:
<asp:LinkButton ID="FactionListViewBook" runat="server" CommandName="Sort"
CommandArgument="Book">Book</asp:LinkButton></th>
Became:
<asp:LinkButton ID="FactionListViewBook" runat="server" CommandName="Sort"
CommandArgument="Book.Title">Book</asp:LinkButton></th>
And my SelectMethod became:
public IQueryable<GameFaction> FactionGetData(string sortByExpression)
{
IQueryable<Faction> query = _context.Factions.Include(faction => faction.Book);
sortByExpression = sortByExpression == null ? "Name" : sortByExpression;
if (sortByExpression.EndsWith(" DESC"))
{
query = query.OrderByDescending(sortByExpression.SubString(0, sortByExpression.Length - 5));
}
else
{
query = query.OrderBy(sortByExpression);
}
return query;
}
Note that this uses the extension method mentioned in the link above which originally came from here: Dynamic LINQ OrderBy on IEnumerable<T>