第一个全版本
This commit is contained in:
parent
5a4dee9360
commit
8f3b6b3aad
|
@ -1,8 +1,8 @@
|
|||
:start
|
||||
::定义版本
|
||||
set EFCORE2=2.1.0.21
|
||||
set EFCORE3=3.1.0.21
|
||||
set EFCORE5=5.2.0.02
|
||||
set EFCORE2=2.2.0.03
|
||||
set EFCORE3=3.2.0.03
|
||||
set EFCORE5=5.2.0.03
|
||||
|
||||
::删除所有bin与obj下的文件
|
||||
@echo off
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.9" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src2x\ShardingCore.2x\ShardingCore.2x.csproj" />
|
||||
<ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -44,14 +44,18 @@ namespace ShardingCore.Sharding.Enumerators
|
|||
{
|
||||
_source.Dispose();
|
||||
}
|
||||
|
||||
private bool _canMoveNext=true;
|
||||
public async Task<bool> MoveNext(CancellationToken cancellationToken=new CancellationToken())
|
||||
{
|
||||
if (skip)
|
||||
{
|
||||
skip = false;
|
||||
return null!=_source.Current;
|
||||
_canMoveNext= null != _source.Current;
|
||||
return _canMoveNext;
|
||||
}
|
||||
return await _source.MoveNext(cancellationToken);
|
||||
_canMoveNext= await _source.MoveNext(cancellationToken);
|
||||
return _canMoveNext;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -76,14 +80,9 @@ namespace ShardingCore.Sharding.Enumerators
|
|||
#if EFCORE2
|
||||
public bool HasElement()
|
||||
{
|
||||
try
|
||||
{
|
||||
return null != _source.Current;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (!_canMoveNext)
|
||||
return false;
|
||||
}
|
||||
return null != _source.Current;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue