I want to write a EF query which does order by ascending or descending based on condition. Following is the my pseudo code:
var result= q.OrderByDescending(x => x.StatusId == 3)
then if( x.StatusId == 3)
then order by x.ReserveDate
else
then order by descending x.LastUpdateDate
How can i do this?