views:

37

answers:

1

I have a list of NHibernate.Expression.Order objects and want to convert them into a sql string.

i.e. "Name ASC, Id DESC, Amount ASC"

A: 
List<string> sqlSortingList = new List<string>();
                    if (OrderList != null)
                    {
                        foreach (Order order in OrderList)
                        {
                            sqlSortingList.Add(order.ToString());
                        }
                    }

Later I will concatenate the strings into one string.

Rookian