|
@@ -303,12 +303,12 @@ namespace TEAMModelOS.SDK.DI
|
|
|
|
|
|
if (ASC != null)
|
|
if (ASC != null)
|
|
{
|
|
{
|
|
- sql.Append(" Order By c." + OrderByValue);
|
|
|
|
|
|
+ sql.Append(" order By c." + OrderByValue);
|
|
//sql.Append(" Order By c." + "@OrderByValue");
|
|
//sql.Append(" Order By c." + "@OrderByValue");
|
|
}
|
|
}
|
|
else if (DESC != null)
|
|
else if (DESC != null)
|
|
{
|
|
{
|
|
- sql.Append(" Order By c." + OrderByValue + " DESC ");
|
|
|
|
|
|
+ sql.Append(" order By c." + OrderByValue + " DESC ");
|
|
// sql.Append(" Order By c." + "@OrderByValue"+ " DESC " );
|
|
// sql.Append(" Order By c." + "@OrderByValue"+ " DESC " );
|
|
}
|
|
}
|
|
|
|
|
|
@@ -330,21 +330,13 @@ namespace TEAMModelOS.SDK.DI
|
|
QueryText = sql.ToString(),
|
|
QueryText = sql.ToString(),
|
|
Parameters = parmeters
|
|
Parameters = parmeters
|
|
};
|
|
};
|
|
- if (cosmosDbQuery.QueryText.Contains("order", StringComparison.OrdinalIgnoreCase) && cosmosDbQuery.QueryText.Contains("by", StringComparison.OrdinalIgnoreCase) && cosmosDbQuery.QueryText.Contains("distinct", StringComparison.OrdinalIgnoreCase))
|
|
|
|
- {
|
|
|
|
- cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("distinct", " ");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
return cosmosDbQuery;
|
|
return cosmosDbQuery;
|
|
}
|
|
}
|
|
cosmosDbQuery = new AzureCosmosQuery
|
|
cosmosDbQuery = new AzureCosmosQuery
|
|
{
|
|
{
|
|
QueryText = sql.ToString()
|
|
QueryText = sql.ToString()
|
|
};
|
|
};
|
|
-
|
|
|
|
- if (cosmosDbQuery.QueryText.Contains("order", StringComparison.OrdinalIgnoreCase) && cosmosDbQuery.QueryText.Contains("by", StringComparison.OrdinalIgnoreCase) && cosmosDbQuery.QueryText.Contains("distinct", StringComparison.OrdinalIgnoreCase))
|
|
|
|
- {
|
|
|
|
- cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("distinct", " ");
|
|
|
|
- }
|
|
|
|
return cosmosDbQuery;
|
|
return cosmosDbQuery;
|
|
}
|
|
}
|
|
|
|
|