Update OrderByPropertyName

This commit is contained in:
sunkaixuan 2023-07-27 12:34:26 +08:00
parent 3e938d0dca
commit 8f5a13ef6e

View File

@ -1078,7 +1078,7 @@ namespace SqlSugar
}
public ISugarQueryable<T> OrderByPropertyName(string orderPropertyName, OrderByType? orderByType = null)
{
if (orderPropertyName != null)
if (orderPropertyName.HasValue())
{
if (this.Context.EntityMaintenance.GetEntityInfoWithAttr(typeof(T)).Columns.Any(it =>
it.DbColumnName?.EqualCase(orderPropertyName)==true