v3.2.693-preview20230329

This commit is contained in:
2881099
2023-03-29 13:17:10 +08:00
parent 5659e527ed
commit 8c2ebe3234
32 changed files with 36 additions and 49 deletions

View File

@ -17,7 +17,7 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<Version>3.2.693-preview20230326</Version>
<Version>3.2.693-preview20230329</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -1635,7 +1635,12 @@ namespace FreeSql.Internal.CommonProvider
}
return ret;
}
async public Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default) => typeof(T1) == typeof(TDto) ? await ToListAsync(false, cancellationToken) as List<TDto> : await ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
async public Task<List<TDto>> ToListAsync<TDto>(CancellationToken cancellationToken = default)
{
if (typeof(T1) == typeof(TDto)) return await ToListAsync(false, cancellationToken) as List<TDto>;
if (_tables.FirstOrDefault()?.Table.Type == typeof(object)) return await ToListAsync<TDto>("*", cancellationToken);
return await ToListAsync(GetToListDtoSelector<TDto>(), cancellationToken);
}
public Task<int> InsertIntoAsync<TTargetEntity>(string tableName, Expression<Func<T1, TTargetEntity>> select, CancellationToken cancellationToken = default) where TTargetEntity : class => base.InternalInsertIntoAsync<TTargetEntity>(tableName, select, cancellationToken);