mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Synchronization code
This commit is contained in:
@@ -1138,6 +1138,16 @@ namespace SqlSugar
|
||||
{
|
||||
return this.Select<TResult>(expression);
|
||||
}
|
||||
if (sql.StartsWith("*,"))
|
||||
{
|
||||
var columns = this.Context.EntityMaintenance.GetEntityInfo<T>()
|
||||
.Columns.Where(it => typeof(TResult).GetProperties().Any(s => s.Name.EqualCase(it.PropertyName))).Where(it => it.IsIgnore == false).ToList();
|
||||
if (columns.Any())
|
||||
{
|
||||
sql = string.Join(",", columns.Select(it => $"{SqlBuilder.GetTranslationColumnName(it.DbColumnName)} AS {SqlBuilder.GetTranslationColumnName(it.PropertyName)} "))
|
||||
+ "," + sql.TrimStart('*').TrimStart(',');
|
||||
}
|
||||
}
|
||||
if (this.QueryBuilder.TableShortName.IsNullOrEmpty())
|
||||
{
|
||||
this.QueryBuilder.TableShortName = clone.QueryBuilder.TableShortName;
|
||||
|
@@ -708,6 +708,8 @@ namespace SqlSugar
|
||||
{
|
||||
var methodInfo = callExpresion.Method;
|
||||
foreach (var item in datas)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
if (callExpresion.Arguments.Count == 0)
|
||||
{
|
||||
@@ -734,6 +736,7 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<string, T> EnumToDictionary<T>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user