This commit is contained in:
@@ -8,9 +8,6 @@ namespace AyaNova.DataList
|
||||
public static class DataListSqlFilterOrderByBuilder
|
||||
{
|
||||
|
||||
// public static string DefaultGetManyOrderBy => "ORDER BY ID DESC";
|
||||
|
||||
// public static string DefaultPickListOrderBy => "ORDER BY NAME ASC";
|
||||
|
||||
public static string DataFilterToSQLOrderBy(List<AyaDataListFieldDefinition> objectFieldsList, JArray listViewArray)
|
||||
{
|
||||
@@ -60,8 +57,8 @@ namespace AyaNova.DataList
|
||||
if (sb.Length == 0)
|
||||
{
|
||||
//no sort specified so default it
|
||||
AyaDataListFieldDefinition rid = objectFieldsList.FirstOrDefault(x => x.IsRowId == true);
|
||||
if (rid!=null)
|
||||
AyaDataListFieldDefinition rid = objectFieldsList.FirstOrDefault(x => x.IsRowId == true);
|
||||
if (rid != null)
|
||||
{
|
||||
return $"ORDER BY {rid.SqlIdColumnName} DESC";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user