Queryable.Select (dynamic exp)

This commit is contained in:
sunkaixuan
2023-09-29 14:56:34 +08:00
parent efc0753426
commit cc80aa5bc5
3 changed files with 32 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Dynamic;
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace SqlSugar
{
@@ -1339,6 +1339,15 @@ namespace SqlSugar
}
return _Select<TResult>(expression);
}
public ISugarQueryable<TResult> Select<TResult>(string expShortName, FormattableString expSelect, Type propertyType)
{
var exp = DynamicCoreHelper.GetMember(typeof(TResult),propertyType, expShortName, expSelect);
return _Select<TResult>(exp);
}
public ISugarQueryable<T> Select(string expShortName, FormattableString expSelect,Type propertyType)
{
return Select<T>(expShortName, expSelect, propertyType);
}
public virtual ISugarQueryable<TResult> Select<TResult>(Expression<Func<T, TResult>> expression)
{
if (IsAppendNavColumns())