Come convertire un oggetto nibernate.expression.order in una stringa?
-
14-09-2020 - |
Domanda
Ho un elenco di oggetti nibernate.expression.order e vuoi convertirli in una stringa SQL.
I.e."Nome ASC, ID Desc, Importo ASC"
Soluzione
List<string> sqlSortingList = new List<string>();
if (OrderList != null)
{
foreach (Order order in OrderList)
{
sqlSortingList.Add(order.ToString());
}
}
.
Più tardi concatenerò le stringhe in una stringa.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow