Update OrderByPropertyName

This commit is contained in:
sunkaixuan
2023-07-27 12:38:57 +08:00
parent 8f5a13ef6e
commit 30ca507c8d

View File

@@ -1080,6 +1080,14 @@ namespace SqlSugar
{
if (orderPropertyName.HasValue())
{
if (orderPropertyName.Contains(","))
{
foreach (var item in orderPropertyName.Split(','))
{
this.OrderByPropertyName(item,orderByType);
}
return this;
}
if (this.Context.EntityMaintenance.GetEntityInfoWithAttr(typeof(T)).Columns.Any(it =>
it.DbColumnName?.EqualCase(orderPropertyName)==true
|| it.PropertyName?.EqualCase(orderPropertyName)==true))