让项目支持多个框架 ,EFCORE编译条件使用.Net 内置定义来区分。

This commit is contained in:
MysticBoy 2022-09-28 13:12:08 +08:00
parent e89cbc806d
commit 478ba1f499
76 changed files with 499 additions and 482 deletions

View File

@ -1,226 +1,190 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59 VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{490FAE47-4476-4508-B216-505FC850447F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{490FAE47-4476-4508-B216-505FC850447F}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore", "src\ShardingCore\ShardingCore.csproj", "{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore", "src\ShardingCore\ShardingCore.csproj", "{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src3x", "src3x", "{62AAE0FE-4099-4A48-AA3C-F76F14C62655}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CC2C88C0-65F2-445D-BE78-973B840FE281}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.3x", "src3x\ShardingCore.3x\ShardingCore.3x.csproj", "{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CC2C88C0-65F2-445D-BE78-973B840FE281}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServer", "samples\Sample.SqlServer\Sample.SqlServer.csproj", "{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.AutoByDate.SqlServer", "samples\Samples.AutoByDate.SqlServer\Samples.AutoByDate.SqlServer.csproj", "{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServer", "samples\Sample.SqlServer\Sample.SqlServer.csproj", "{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.MySql", "samples\Sample.MySql\Sample.MySql.csproj", "{90675788-D5C3-415A-9C18-FF159A75B4D5}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.AutoByDate.SqlServer", "samples\Samples.AutoByDate.SqlServer\Samples.AutoByDate.SqlServer.csproj", "{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServer3x", "samples\Sample.SqlServer3x\Sample.SqlServer3x.csproj", "{447D5357-F095-45DE-9DA5-2D9997237366}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.MySql", "samples\Sample.MySql\Sample.MySql.csproj", "{90675788-D5C3-415A-9C18-FF159A75B4D5}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.AbpSharding", "samples\Samples.AbpSharding\Samples.AbpSharding.csproj", "{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServer3x", "samples\Sample.SqlServer3x\Sample.SqlServer3x.csproj", "{447D5357-F095-45DE-9DA5-2D9997237366}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.BulkConsole", "samples\Sample.BulkConsole\Sample.BulkConsole.csproj", "{2443CC8B-FB7D-47A7-9663-F3848BB30A36}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.AbpSharding", "samples\Samples.AbpSharding\Samples.AbpSharding.csproj", "{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingDataSource", "samples\Sample.SqlServerShardingDataSource\Sample.SqlServerShardingDataSource.csproj", "{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.BulkConsole", "samples\Sample.BulkConsole\Sample.BulkConsole.csproj", "{2443CC8B-FB7D-47A7-9663-F3848BB30A36}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Migrations", "samples\Sample.Migrations\Sample.Migrations.csproj", "{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src2x", "src2x", "{F91949B0-02D5-4E3B-ACF4-AFA6C99A1E04}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingTable", "samples\Sample.SqlServerShardingTable\Sample.SqlServerShardingTable.csproj", "{88FA5615-1BAA-4021-87EF-9D4A60257FE4}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.2x", "src2x\ShardingCore.2x\ShardingCore.2x.csproj", "{A07C597D-339D-4378-BE4C-A2AF7473340B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingAll", "samples\Sample.SqlServerShardingAll\Sample.SqlServerShardingAll.csproj", "{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingDataSource", "samples\Sample.SqlServerShardingDataSource\Sample.SqlServerShardingDataSource.csproj", "{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test5x", "test\ShardingCore.Test5x\ShardingCore.Test5x.csproj", "{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src5x", "src5x", "{EB1C9149-78C9-4D99-BE3F-B80FE2015E96}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test3x", "test\ShardingCore.Test3x\ShardingCore.Test3x.csproj", "{E64E09EF-2DC0-4948-A948-256EF5F95C53}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.5x", "src5x\ShardingCore.5x\ShardingCore.5x.csproj", "{68A9F118-EF0A-4D03-8845-77D084561A28}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test2x", "test\ShardingCore.Test2x\ShardingCore.Test2x.csproj", "{5ED4AF17-F16D-4857-B19C-018831109991}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Migrations", "samples\Sample.Migrations\Sample.Migrations.csproj", "{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test", "test\ShardingCore.Test\ShardingCore.Test.csproj", "{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingTable", "samples\Sample.SqlServerShardingTable\Sample.SqlServerShardingTable.csproj", "{88FA5615-1BAA-4021-87EF-9D4A60257FE4}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{B458D737-33C5-4C10-9687-0BED2E7CD346}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.SqlServerShardingAll", "samples\Sample.SqlServerShardingAll\Sample.SqlServerShardingAll.csproj", "{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCoreBenchmark", "benchmarks\ShardingCoreBenchmark\ShardingCoreBenchmark.csproj", "{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test5x", "test\ShardingCore.Test5x\ShardingCore.Test5x.csproj", "{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCoreBenchmark5x", "benchmarks\ShardingCoreBenchmark5x\ShardingCoreBenchmark5x.csproj", "{ED191305-AB19-4863-A48A-7BA4C21F467B}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test3x", "test\ShardingCore.Test3x\ShardingCore.Test3x.csproj", "{E64E09EF-2DC0-4948-A948-256EF5F95C53}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.NoShardingMultiLevel", "samples\Sample.NoShardingMultiLevel\Sample.NoShardingMultiLevel.csproj", "{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test2x", "test\ShardingCore.Test2x\ShardingCore.Test2x.csproj", "{5ED4AF17-F16D-4857-B19C-018831109991}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.MultiConfig", "samples\Sample.MultiConfig\Sample.MultiConfig.csproj", "{D839D632-4AE4-4F75-8A2C-49EE029B0787}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.Test", "test\ShardingCore.Test\ShardingCore.Test.csproj", "{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.AutoCreateIfPresent", "samples\Sample.AutoCreateIfPresent\Sample.AutoCreateIfPresent.csproj", "{40C83D48-0614-4651-98C6-2ABBE857D83D}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{B458D737-33C5-4C10-9687-0BED2E7CD346}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCore.CommonTest", "test\ShardingCore.CommonTest\ShardingCore.CommonTest.csproj", "{3E895438-E609-4860-8391-6897ED55DA06}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCoreBenchmark", "benchmarks\ShardingCoreBenchmark\ShardingCoreBenchmark.csproj", "{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ShardingConsole", "samples\Sample.ShardingConsole\Sample.ShardingConsole.csproj", "{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShardingCoreBenchmark5x", "benchmarks\ShardingCoreBenchmark5x\ShardingCoreBenchmark5x.csproj", "{ED191305-AB19-4863-A48A-7BA4C21F467B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.OracleIssue", "samples\Sample.OracleIssue\Sample.OracleIssue.csproj", "{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.NoShardingMultiLevel", "samples\Sample.NoShardingMultiLevel\Sample.NoShardingMultiLevel.csproj", "{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}" Global
EndProject GlobalSection(SolutionConfigurationPlatforms) = preSolution
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.MultiConfig", "samples\Sample.MultiConfig\Sample.MultiConfig.csproj", "{D839D632-4AE4-4F75-8A2C-49EE029B0787}" Debug|Any CPU = Debug|Any CPU
EndProject Release|Any CPU = Release|Any CPU
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.AutoCreateIfPresent", "samples\Sample.AutoCreateIfPresent\Sample.AutoCreateIfPresent.csproj", "{40C83D48-0614-4651-98C6-2ABBE857D83D}" EndGlobalSection
EndProject GlobalSection(ProjectConfigurationPlatforms) = postSolution
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShardingCore.CommonTest", "test\ShardingCore.CommonTest\ShardingCore.CommonTest.csproj", "{3E895438-E609-4860-8391-6897ED55DA06}" {3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
EndProject {3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.ShardingConsole", "samples\Sample.ShardingConsole\Sample.ShardingConsole.csproj", "{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}" {3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndProject {3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Release|Any CPU.Build.0 = Release|Any CPU
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src6x", "src6x", "{BB80F31B-37F1-44C2-BCFA-F45D1AC765FE}" {D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
EndProject {D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShardingCore.6x", "src6x\ShardingCore.6x\ShardingCore.6x.csproj", "{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71}" {D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndProject {D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Release|Any CPU.Build.0 = Release|Any CPU
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.OracleIssue", "samples\Sample.OracleIssue\Sample.OracleIssue.csproj", "{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}" {C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
EndProject {C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Debug|Any CPU.Build.0 = Debug|Any CPU
Global {C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Release|Any CPU.ActiveCfg = Release|Any CPU
GlobalSection(SolutionConfigurationPlatforms) = preSolution {C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Release|Any CPU.Build.0 = Release|Any CPU
Debug|Any CPU = Debug|Any CPU {90675788-D5C3-415A-9C18-FF159A75B4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Release|Any CPU = Release|Any CPU {90675788-D5C3-415A-9C18-FF159A75B4D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection {90675788-D5C3-415A-9C18-FF159A75B4D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
GlobalSection(ProjectConfigurationPlatforms) = postSolution {90675788-D5C3-415A-9C18-FF159A75B4D5}.Release|Any CPU.Build.0 = Release|Any CPU
{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {447D5357-F095-45DE-9DA5-2D9997237366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {447D5357-F095-45DE-9DA5-2D9997237366}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {447D5357-F095-45DE-9DA5-2D9997237366}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7}.Release|Any CPU.Build.0 = Release|Any CPU {447D5357-F095-45DE-9DA5-2D9997237366}.Release|Any CPU.Build.0 = Release|Any CPU
{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414}.Debug|Any CPU.Build.0 = Debug|Any CPU {1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414}.Release|Any CPU.ActiveCfg = Release|Any CPU {1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414}.Release|Any CPU.Build.0 = Release|Any CPU {1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Release|Any CPU.Build.0 = Release|Any CPU
{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Debug|Any CPU.Build.0 = Debug|Any CPU {2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Release|Any CPU.ActiveCfg = Release|Any CPU {2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F}.Release|Any CPU.Build.0 = Release|Any CPU {2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Release|Any CPU.Build.0 = Release|Any CPU
{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Debug|Any CPU.Build.0 = Debug|Any CPU {0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Release|Any CPU.ActiveCfg = Release|Any CPU {0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539}.Release|Any CPU.Build.0 = Release|Any CPU {0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Release|Any CPU.Build.0 = Release|Any CPU
{90675788-D5C3-415A-9C18-FF159A75B4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90675788-D5C3-415A-9C18-FF159A75B4D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90675788-D5C3-415A-9C18-FF159A75B4D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90675788-D5C3-415A-9C18-FF159A75B4D5}.Release|Any CPU.Build.0 = Release|Any CPU {648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Release|Any CPU.Build.0 = Release|Any CPU
{447D5357-F095-45DE-9DA5-2D9997237366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{447D5357-F095-45DE-9DA5-2D9997237366}.Debug|Any CPU.Build.0 = Debug|Any CPU {88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{447D5357-F095-45DE-9DA5-2D9997237366}.Release|Any CPU.ActiveCfg = Release|Any CPU {88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{447D5357-F095-45DE-9DA5-2D9997237366}.Release|Any CPU.Build.0 = Release|Any CPU {88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Release|Any CPU.Build.0 = Release|Any CPU
{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1136B8C9-3539-42FA-97FD-CAA6F146FCF0}.Release|Any CPU.Build.0 = Release|Any CPU {FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Release|Any CPU.Build.0 = Release|Any CPU
{2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Debug|Any CPU.Build.0 = Debug|Any CPU {59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Release|Any CPU.ActiveCfg = Release|Any CPU {59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2443CC8B-FB7D-47A7-9663-F3848BB30A36}.Release|Any CPU.Build.0 = Release|Any CPU {59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Release|Any CPU.Build.0 = Release|Any CPU
{A07C597D-339D-4378-BE4C-A2AF7473340B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E64E09EF-2DC0-4948-A948-256EF5F95C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A07C597D-339D-4378-BE4C-A2AF7473340B}.Debug|Any CPU.Build.0 = Debug|Any CPU {E64E09EF-2DC0-4948-A948-256EF5F95C53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A07C597D-339D-4378-BE4C-A2AF7473340B}.Release|Any CPU.ActiveCfg = Release|Any CPU {E64E09EF-2DC0-4948-A948-256EF5F95C53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A07C597D-339D-4378-BE4C-A2AF7473340B}.Release|Any CPU.Build.0 = Release|Any CPU {E64E09EF-2DC0-4948-A948-256EF5F95C53}.Release|Any CPU.Build.0 = Release|Any CPU
{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5ED4AF17-F16D-4857-B19C-018831109991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Debug|Any CPU.Build.0 = Debug|Any CPU {5ED4AF17-F16D-4857-B19C-018831109991}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Release|Any CPU.ActiveCfg = Release|Any CPU {5ED4AF17-F16D-4857-B19C-018831109991}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF}.Release|Any CPU.Build.0 = Release|Any CPU {5ED4AF17-F16D-4857-B19C-018831109991}.Release|Any CPU.Build.0 = Release|Any CPU
{68A9F118-EF0A-4D03-8845-77D084561A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68A9F118-EF0A-4D03-8845-77D084561A28}.Debug|Any CPU.Build.0 = Debug|Any CPU {32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68A9F118-EF0A-4D03-8845-77D084561A28}.Release|Any CPU.ActiveCfg = Release|Any CPU {32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68A9F118-EF0A-4D03-8845-77D084561A28}.Release|Any CPU.Build.0 = Release|Any CPU {32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Release|Any CPU.Build.0 = Release|Any CPU
{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Debug|Any CPU.Build.0 = Debug|Any CPU
{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Release|Any CPU.ActiveCfg = Release|Any CPU
{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C}.Release|Any CPU.Build.0 = Release|Any CPU {8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Release|Any CPU.Build.0 = Release|Any CPU
{88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ED191305-AB19-4863-A48A-7BA4C21F467B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Debug|Any CPU.Build.0 = Debug|Any CPU {ED191305-AB19-4863-A48A-7BA4C21F467B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Release|Any CPU.ActiveCfg = Release|Any CPU {ED191305-AB19-4863-A48A-7BA4C21F467B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88FA5615-1BAA-4021-87EF-9D4A60257FE4}.Release|Any CPU.Build.0 = Release|Any CPU {ED191305-AB19-4863-A48A-7BA4C21F467B}.Release|Any CPU.Build.0 = Release|Any CPU
{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Debug|Any CPU.Build.0 = Debug|Any CPU {DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Release|Any CPU.ActiveCfg = Release|Any CPU {DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06}.Release|Any CPU.Build.0 = Release|Any CPU {DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Release|Any CPU.Build.0 = Release|Any CPU
{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D839D632-4AE4-4F75-8A2C-49EE029B0787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D839D632-4AE4-4F75-8A2C-49EE029B0787}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {D839D632-4AE4-4F75-8A2C-49EE029B0787}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59BDEB59-1674-4A71-8F3F-0A690F48ADE6}.Release|Any CPU.Build.0 = Release|Any CPU {D839D632-4AE4-4F75-8A2C-49EE029B0787}.Release|Any CPU.Build.0 = Release|Any CPU
{E64E09EF-2DC0-4948-A948-256EF5F95C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {40C83D48-0614-4651-98C6-2ABBE857D83D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E64E09EF-2DC0-4948-A948-256EF5F95C53}.Debug|Any CPU.Build.0 = Debug|Any CPU {40C83D48-0614-4651-98C6-2ABBE857D83D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E64E09EF-2DC0-4948-A948-256EF5F95C53}.Release|Any CPU.ActiveCfg = Release|Any CPU {40C83D48-0614-4651-98C6-2ABBE857D83D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E64E09EF-2DC0-4948-A948-256EF5F95C53}.Release|Any CPU.Build.0 = Release|Any CPU {40C83D48-0614-4651-98C6-2ABBE857D83D}.Release|Any CPU.Build.0 = Release|Any CPU
{5ED4AF17-F16D-4857-B19C-018831109991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3E895438-E609-4860-8391-6897ED55DA06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5ED4AF17-F16D-4857-B19C-018831109991}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E895438-E609-4860-8391-6897ED55DA06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5ED4AF17-F16D-4857-B19C-018831109991}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E895438-E609-4860-8391-6897ED55DA06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5ED4AF17-F16D-4857-B19C-018831109991}.Release|Any CPU.Build.0 = Release|Any CPU {3E895438-E609-4860-8391-6897ED55DA06}.Release|Any CPU.Build.0 = Release|Any CPU
{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32EA64CC-0877-4B4D-BFBA-504EDB2237D6}.Release|Any CPU.Build.0 = Release|Any CPU {BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Release|Any CPU.Build.0 = Release|Any CPU
{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Debug|Any CPU.Build.0 = Debug|Any CPU {BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Release|Any CPU.ActiveCfg = Release|Any CPU {BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846}.Release|Any CPU.Build.0 = Release|Any CPU {BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Release|Any CPU.Build.0 = Release|Any CPU
{ED191305-AB19-4863-A48A-7BA4C21F467B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU EndGlobalSection
{ED191305-AB19-4863-A48A-7BA4C21F467B}.Debug|Any CPU.Build.0 = Debug|Any CPU GlobalSection(SolutionProperties) = preSolution
{ED191305-AB19-4863-A48A-7BA4C21F467B}.Release|Any CPU.ActiveCfg = Release|Any CPU HideSolutionNode = FALSE
{ED191305-AB19-4863-A48A-7BA4C21F467B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection
{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU GlobalSection(NestedProjects) = preSolution
{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Debug|Any CPU.Build.0 = Debug|Any CPU {3CAF09A6-6ABD-41D9-BA57-9A822B8095F7} = {490FAE47-4476-4508-B216-505FC850447F}
{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Release|Any CPU.ActiveCfg = Release|Any CPU {D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734}.Release|Any CPU.Build.0 = Release|Any CPU {C34FCF48-1A98-4268-BFEE-6C9BFC7FD539} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{D839D632-4AE4-4F75-8A2C-49EE029B0787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {90675788-D5C3-415A-9C18-FF159A75B4D5} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{D839D632-4AE4-4F75-8A2C-49EE029B0787}.Debug|Any CPU.Build.0 = Debug|Any CPU {447D5357-F095-45DE-9DA5-2D9997237366} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{D839D632-4AE4-4F75-8A2C-49EE029B0787}.Release|Any CPU.ActiveCfg = Release|Any CPU {1136B8C9-3539-42FA-97FD-CAA6F146FCF0} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{D839D632-4AE4-4F75-8A2C-49EE029B0787}.Release|Any CPU.Build.0 = Release|Any CPU {2443CC8B-FB7D-47A7-9663-F3848BB30A36} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{40C83D48-0614-4651-98C6-2ABBE857D83D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0193E3CF-F2FD-449A-B2D5-7F68E551FDBF} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{40C83D48-0614-4651-98C6-2ABBE857D83D}.Debug|Any CPU.Build.0 = Debug|Any CPU {648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{40C83D48-0614-4651-98C6-2ABBE857D83D}.Release|Any CPU.ActiveCfg = Release|Any CPU {88FA5615-1BAA-4021-87EF-9D4A60257FE4} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{40C83D48-0614-4651-98C6-2ABBE857D83D}.Release|Any CPU.Build.0 = Release|Any CPU {FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{3E895438-E609-4860-8391-6897ED55DA06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59BDEB59-1674-4A71-8F3F-0A690F48ADE6} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{3E895438-E609-4860-8391-6897ED55DA06}.Debug|Any CPU.Build.0 = Debug|Any CPU {E64E09EF-2DC0-4948-A948-256EF5F95C53} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{3E895438-E609-4860-8391-6897ED55DA06}.Release|Any CPU.ActiveCfg = Release|Any CPU {5ED4AF17-F16D-4857-B19C-018831109991} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{3E895438-E609-4860-8391-6897ED55DA06}.Release|Any CPU.Build.0 = Release|Any CPU {32EA64CC-0877-4B4D-BFBA-504EDB2237D6} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CE5E8AF-DDB7-4989-8AA4-1D47E4226846} = {B458D737-33C5-4C10-9687-0BED2E7CD346}
{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Debug|Any CPU.Build.0 = Debug|Any CPU {ED191305-AB19-4863-A48A-7BA4C21F467B} = {B458D737-33C5-4C10-9687-0BED2E7CD346}
{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Release|Any CPU.ActiveCfg = Release|Any CPU {DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8}.Release|Any CPU.Build.0 = Release|Any CPU {D839D632-4AE4-4F75-8A2C-49EE029B0787} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {40C83D48-0614-4651-98C6-2ABBE857D83D} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E895438-E609-4860-8391-6897ED55DA06} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71}.Release|Any CPU.ActiveCfg = Release|Any CPU {BAB101D4-2BFF-44CE-90E3-8B72DDB266B8} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71}.Release|Any CPU.Build.0 = Release|Any CPU {BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU EndGlobalSection
{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Debug|Any CPU.Build.0 = Debug|Any CPU GlobalSection(ExtensibilityGlobals) = postSolution
{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Release|Any CPU.ActiveCfg = Release|Any CPU SolutionGuid = {8C07A667-E8B4-43C7-8053-721584BAD291}
{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection
EndGlobalSection EndGlobal
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3CAF09A6-6ABD-41D9-BA57-9A822B8095F7} = {490FAE47-4476-4508-B216-505FC850447F}
{E0FDBFA9-AE5F-42FB-8A60-4E5D9E7D5414} = {62AAE0FE-4099-4A48-AA3C-F76F14C62655}
{D48E5EC2-CF83-4B17-8BBA-BDE52ADFAB1F} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{C34FCF48-1A98-4268-BFEE-6C9BFC7FD539} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{90675788-D5C3-415A-9C18-FF159A75B4D5} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{447D5357-F095-45DE-9DA5-2D9997237366} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{1136B8C9-3539-42FA-97FD-CAA6F146FCF0} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{2443CC8B-FB7D-47A7-9663-F3848BB30A36} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{A07C597D-339D-4378-BE4C-A2AF7473340B} = {F91949B0-02D5-4E3B-ACF4-AFA6C99A1E04}
{0193E3CF-F2FD-449A-B2D5-7F68E551FDBF} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{68A9F118-EF0A-4D03-8845-77D084561A28} = {EB1C9149-78C9-4D99-BE3F-B80FE2015E96}
{648DCBBE-BE8F-4EAC-8367-FE7BC558DA8C} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{88FA5615-1BAA-4021-87EF-9D4A60257FE4} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{FD2C6D03-8D6D-4C1C-B534-4C785A4B1B06} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{59BDEB59-1674-4A71-8F3F-0A690F48ADE6} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{E64E09EF-2DC0-4948-A948-256EF5F95C53} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{5ED4AF17-F16D-4857-B19C-018831109991} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{32EA64CC-0877-4B4D-BFBA-504EDB2237D6} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{8CE5E8AF-DDB7-4989-8AA4-1D47E4226846} = {B458D737-33C5-4C10-9687-0BED2E7CD346}
{ED191305-AB19-4863-A48A-7BA4C21F467B} = {B458D737-33C5-4C10-9687-0BED2E7CD346}
{DCEBAC86-E62B-4B6C-A352-B8C1C2C6F734} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{D839D632-4AE4-4F75-8A2C-49EE029B0787} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{40C83D48-0614-4651-98C6-2ABBE857D83D} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{3E895438-E609-4860-8391-6897ED55DA06} = {CC2C88C0-65F2-445D-BE78-973B840FE281}
{BAB101D4-2BFF-44CE-90E3-8B72DDB266B8} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
{1FF83CC3-A5F2-45E0-AA39-23C4DDF87D71} = {BB80F31B-37F1-44C2-BCFA-F45D1AC765FE}
{BF4FEA2A-3F09-47D8-9BF7-4261D8D1671D} = {EDF8869A-C1E1-491B-BC9F-4A33F4DE1C73}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8C07A667-E8B4-43C7-8053-721584BAD291}
EndGlobalSection
EndGlobal

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
@ -11,8 +11,8 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.8" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.8" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src5x\ShardingCore.5x\ShardingCore.5x.csproj" /> <ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
@ -8,8 +8,8 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.23" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.23" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src3x\ShardingCore.3x\ShardingCore.3x.csproj" /> <ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="6.6.2" /> <PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="6.6.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.4.4" /> <PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.4.4" />
</ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.*" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\test\ShardingCore.Test5x\ShardingCore.Test5x.csproj" /> <ProjectReference Include="..\..\test\ShardingCore.Test\ShardingCore.Test.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -4,7 +4,7 @@ using System.Linq.Expressions;
using System.Text; using System.Text;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Internal;
#endif #endif

View File

@ -2,7 +2,7 @@
using System.Linq.Expressions; using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Internal;
#endif #endif

View File

@ -15,7 +15,7 @@ namespace ShardingCore.Core
/// Email: 326308290@qq.com /// Email: 326308290@qq.com
public interface IShardingModelCacheOption public interface IShardingModelCacheOption
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
CacheItemPriority GetModelCachePriority(); CacheItemPriority GetModelCachePriority();
int GetModelCacheEntrySize(); int GetModelCacheEntrySize();
#endif #endif

View File

@ -25,7 +25,7 @@ namespace ShardingCore.Core.VirtualRoutes
return ReferenceEquals(this, obj) || obj is TableRouteUnit other && Equals(other); return ReferenceEquals(this, obj) || obj is TableRouteUnit other && Equals(other);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {
@ -33,7 +33,7 @@ namespace ShardingCore.Core.VirtualRoutes
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked unchecked

View File

@ -47,7 +47,7 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.RoutingRuleEngine
return $"(has different tail:{HasDifferentTail},current table:[{string.Join(",", ReplaceTables.Select(o => $"{o.DataSourceName}.{o.Tail}.{o.EntityType}"))}])"; return $"(has different tail:{HasDifferentTail},current table:[{string.Join(",", ReplaceTables.Select(o => $"{o.DataSourceName}.{o.Tail}.{o.EntityType}"))}])";
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {
@ -55,7 +55,7 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.RoutingRuleEngine
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {

View File

@ -20,7 +20,7 @@ namespace ShardingCore.EFCores.ChangeTrackers
_dbContext = context; _dbContext = context;
} }
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
@ -100,7 +100,7 @@ namespace ShardingCore.EFCores.ChangeTrackers
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override void TrackGraph<TState>(object rootEntity, TState state, Func<EntityEntryGraphNode<TState>, bool> callback) where TState : default public override void TrackGraph<TState>(object rootEntity, TState state, Func<EntityEntryGraphNode<TState>, bool> callback) where TState : default
{ {
if (_dbContext is IShardingDbContext shardingDbContext) if (_dbContext is IShardingDbContext shardingDbContext)
@ -122,7 +122,7 @@ namespace ShardingCore.EFCores.ChangeTrackers
} }
#endif #endif
#if !EFCORE2 && !EFCORE3 #if !NETCOREAPP2_0 && !NETCOREAPP3_0
public override void Clear() public override void Clear()
{ {
if (_dbContext is ICurrentDbContextDiscover) if (_dbContext is ICurrentDbContextDiscover)
@ -134,7 +134,7 @@ namespace ShardingCore.EFCores.ChangeTrackers
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override void TrackGraph<TState>(object rootEntity, TState state, Func<EntityEntryGraphNode, TState, bool> callback) public override void TrackGraph<TState>(object rootEntity, TState state, Func<EntityEntryGraphNode, TState, bool> callback)
{ {
if (_dbContext is IShardingDbContext shardingDbContext) if (_dbContext is IShardingDbContext shardingDbContext)

View File

@ -1,4 +1,4 @@
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using ShardingCore.Core.RuntimeContexts; using ShardingCore.Core.RuntimeContexts;

View File

@ -1,4 +1,4 @@
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;

View File

@ -1,4 +1,4 @@
#if EFCORE3 #if NETCOREAPP3_0
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using ShardingCore.Core.RuntimeContexts; using ShardingCore.Core.RuntimeContexts;

View File

@ -1,4 +1,4 @@
#if EFCORE3 #if NETCOREAPP3_0
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;

View File

@ -1,4 +1,4 @@
#if EFCORE5 #if NET5_0
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using ShardingCore.Core.RuntimeContexts; using ShardingCore.Core.RuntimeContexts;

View File

@ -1,4 +1,4 @@
#if EFCORE5 #if NET5_0
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;

View File

@ -1,4 +1,4 @@
#if EFCORE6 #if NET6_0
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using ShardingCore.Core.RuntimeContexts; using ShardingCore.Core.RuntimeContexts;

View File

@ -1,5 +1,5 @@
 
#if EFCORE6 #if NET6_0
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;

View File

@ -14,11 +14,11 @@ namespace ShardingCore.EFCores.OptionsExtensions
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE6 #if NET6_0
public class ShardingOptionsExtension : IDbContextOptionsExtension public class ShardingOptionsExtension : IDbContextOptionsExtension
{ {
public IShardingRuntimeContext ShardingRuntimeContext { get; } public IShardingRuntimeContext ShardingRuntimeContext { get; }
@ -63,7 +63,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public class ShardingOptionsExtension: IDbContextOptionsExtension public class ShardingOptionsExtension: IDbContextOptionsExtension
{ {
public IShardingRuntimeContext ShardingRuntimeContext { get; } public IShardingRuntimeContext ShardingRuntimeContext { get; }
@ -103,7 +103,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public class ShardingOptionsExtension: IDbContextOptionsExtension public class ShardingOptionsExtension: IDbContextOptionsExtension
{ {
public IShardingRuntimeContext ShardingRuntimeContext { get; } public IShardingRuntimeContext ShardingRuntimeContext { get; }

View File

@ -15,10 +15,10 @@ namespace ShardingCore.EFCores.OptionsExtensions
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE6 #if NET6_0
public class ShardingWrapOptionsExtension : IDbContextOptionsExtension public class ShardingWrapOptionsExtension : IDbContextOptionsExtension
{ {
@ -55,7 +55,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public class ShardingWrapOptionsExtension: IDbContextOptionsExtension public class ShardingWrapOptionsExtension: IDbContextOptionsExtension
{ {
@ -84,7 +84,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public class ShardingWrapOptionsExtension: IDbContextOptionsExtension public class ShardingWrapOptionsExtension: IDbContextOptionsExtension
{ {

View File

@ -14,10 +14,10 @@ namespace ShardingCore.EFCores.OptionsExtensions
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE6 #if NET6_0
public class UnionAllMergeOptionsExtension : IDbContextOptionsExtension public class UnionAllMergeOptionsExtension : IDbContextOptionsExtension
{ {
public void ApplyServices(IServiceCollection services) public void ApplyServices(IServiceCollection services)
@ -50,7 +50,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public class UnionAllMergeOptionsExtension: IDbContextOptionsExtension public class UnionAllMergeOptionsExtension: IDbContextOptionsExtension
{ {
@ -79,7 +79,7 @@ namespace ShardingCore.EFCores.OptionsExtensions
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public class UnionAllMergeOptionsExtension: IDbContextOptionsExtension public class UnionAllMergeOptionsExtension: IDbContextOptionsExtension
{ {

View File

@ -20,27 +20,27 @@ namespace ShardingCore.EFCores
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
public class ShardingRelationalTransaction : RelationalTransaction public class ShardingRelationalTransaction : RelationalTransaction
{ {
private readonly IShardingDbContext _shardingDbContext; private readonly IShardingDbContext _shardingDbContext;
#if EFCORE6 #if NET6_0
public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction, Guid transactionId, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned, ISqlGenerationHelper sqlGenerationHelper) : base(connection, transaction, transactionId, logger, transactionOwned, sqlGenerationHelper) public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction, Guid transactionId, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned, ISqlGenerationHelper sqlGenerationHelper) : base(connection, transaction, transactionId, logger, transactionOwned, sqlGenerationHelper)
{ {
_shardingDbContext = shardingDbContext ?? throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}"); _shardingDbContext = shardingDbContext ?? throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction, Guid transactionId, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned) : base(connection, transaction, transactionId, logger, transactionOwned) public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction, Guid transactionId, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned) : base(connection, transaction, transactionId, logger, transactionOwned)
{ {
_shardingDbContext = shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}"); _shardingDbContext = shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction,IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned) : base(connection, transaction, logger, transactionOwned) public ShardingRelationalTransaction(IShardingDbContext shardingDbContext, IRelationalConnection connection, DbTransaction transaction,IDiagnosticsLogger<DbLoggerCategory.Database.Transaction> logger, bool transactionOwned) : base(connection, transaction, logger, transactionOwned)
{ {
_shardingDbContext = shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}"); _shardingDbContext = shardingDbContext??throw new ShardingCoreInvalidOperationException($"should implement {nameof(IShardingDbContext)}");
@ -71,7 +71,7 @@ namespace ShardingCore.EFCores
_shardingDbContext.NotifyShardingTransaction(); _shardingDbContext.NotifyShardingTransaction();
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()) public override async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken())
{ {

View File

@ -12,10 +12,10 @@ namespace ShardingCore.EFCores
* @Date: Saturday, 14 August 2021 10:17:43 * @Date: Saturday, 14 August 2021 10:17:43
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE5 || EFCORE6 #if NET5_0 || NET6_0
public class ShardingDbSetSource : IDbSetSource public class ShardingDbSetSource : IDbSetSource
{ {
@ -55,7 +55,7 @@ namespace ShardingCore.EFCores
=> (c, name) => new ShardingInternalDbSet<TEntity>(c, name); => (c, name) => new ShardingInternalDbSet<TEntity>(c, name);
} }
#endif #endif
#if EFCORE3 #if NETCOREAPP3_0
public class ShardingDbSetSource:IDbSetSource public class ShardingDbSetSource:IDbSetSource
{ {
@ -87,7 +87,7 @@ namespace ShardingCore.EFCores
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
/// <summary> /// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used /// This API supports the Entity Framework Core infrastructure and is not intended to be used

View File

@ -13,7 +13,7 @@ namespace ShardingCore.EFCores
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if EFCORE2 #if NETCOREAPP2_0
public class ShardingInternalDbQuery<TQuery> : InternalDbQuery<TQuery> where TQuery : class public class ShardingInternalDbQuery<TQuery> : InternalDbQuery<TQuery> where TQuery : class
{ {

View File

@ -26,7 +26,7 @@ namespace ShardingCore.EFCores
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
public class ShardingInternalDbSet<TEntity> : InternalDbSet<TEntity> public class ShardingInternalDbSet<TEntity> : InternalDbSet<TEntity>
@ -36,7 +36,7 @@ namespace ShardingCore.EFCores
private readonly IShardingRuntimeContext _shardingRuntimeContext; private readonly IShardingRuntimeContext _shardingRuntimeContext;
private LocalView<TEntity>? _localView; private LocalView<TEntity>? _localView;
#if EFCORE5 || EFCORE6 #if NET5_0 || NET6_0
public ShardingInternalDbSet(DbContext context, string entityTypeName) : base(context, entityTypeName) public ShardingInternalDbSet(DbContext context, string entityTypeName) : base(context, entityTypeName)
{ {
@ -44,7 +44,7 @@ namespace ShardingCore.EFCores
_shardingRuntimeContext = context.GetShardingRuntimeContext(); _shardingRuntimeContext = context.GetShardingRuntimeContext();
} }
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
public ShardingInternalDbSet(DbContext context) : base(context) public ShardingInternalDbSet(DbContext context) : base(context)
{ {
_context = (IShardingDbContext)context; _context = (IShardingDbContext)context;
@ -128,7 +128,7 @@ namespace ShardingCore.EFCores
/// any release. You should only use it directly in your code with extreme caution and knowing that /// any release. You should only use it directly in your code with extreme caution and knowing that
/// doing so can result in application failures when updating to a new Entity Framework Core release. /// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary> /// </summary>
#if !EFCORE2 #if !NETCOREAPP2_0
public override async ValueTask<EntityEntry<TEntity>> AddAsync( public override async ValueTask<EntityEntry<TEntity>> AddAsync(
TEntity entity, TEntity entity,
CancellationToken cancellationToken = default) CancellationToken cancellationToken = default)
@ -137,7 +137,7 @@ namespace ShardingCore.EFCores
return await genericDbContext.Set<TEntity>().AddAsync(entity, cancellationToken); return await genericDbContext.Set<TEntity>().AddAsync(entity, cancellationToken);
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override async Task<EntityEntry<TEntity>> AddAsync(TEntity entity, CancellationToken cancellationToken = public override async Task<EntityEntry<TEntity>> AddAsync(TEntity entity, CancellationToken cancellationToken =
new CancellationToken()) new CancellationToken())
{ {
@ -365,7 +365,7 @@ namespace ShardingCore.EFCores
return base.Find(keyValues); return base.Find(keyValues);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override ValueTask<TEntity> FindAsync(params object[] keyValues) public override ValueTask<TEntity> FindAsync(params object[] keyValues)
{ {
var primaryKeyFindDbContext = GetDbContextByKeyValue(keyValues); var primaryKeyFindDbContext = GetDbContextByKeyValue(keyValues);
@ -388,7 +388,7 @@ namespace ShardingCore.EFCores
return base.FindAsync(keyValues, cancellationToken); return base.FindAsync(keyValues, cancellationToken);
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override Task<TEntity> FindAsync(params object[] keyValues) public override Task<TEntity> FindAsync(params object[] keyValues)
{ {
var primaryKeyFindDbContext = GetDbContextByKeyValue(keyValues); var primaryKeyFindDbContext = GetDbContextByKeyValue(keyValues);

View File

@ -24,7 +24,7 @@ using ShardingCore.Helpers;
using ShardingCore.Sharding.Abstractions; using ShardingCore.Sharding.Abstractions;
using ShardingCore.Sharding.ShardingDbContextExecutors; using ShardingCore.Sharding.ShardingDbContextExecutors;
#if !EFCORE2 #if !NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure;
#endif #endif
@ -35,32 +35,32 @@ namespace ShardingCore.EFCores
{ {
private readonly IShardingRuntimeContext _shardingRuntimeContext; private readonly IShardingRuntimeContext _shardingRuntimeContext;
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE6 #if NET6_0
public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext,IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IModelRuntimeInitializer modelRuntimeInitializer, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IRelationalCommandDiagnosticsLogger commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, modelRuntimeInitializer, logger, commandLogger, databaseProvider) public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext,IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IModelRuntimeInitializer modelRuntimeInitializer, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IRelationalCommandDiagnosticsLogger commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, modelRuntimeInitializer, logger, commandLogger, databaseProvider)
{ {
_shardingRuntimeContext = shardingRuntimeContext; _shardingRuntimeContext = shardingRuntimeContext;
} }
#endif #endif
#if EFCORE5 #if NET5_0
public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IConventionSetBuilder conventionSetBuilder, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, conventionSetBuilder, logger, commandLogger, databaseProvider) public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IConventionSetBuilder conventionSetBuilder, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, conventionSetBuilder, logger, commandLogger, databaseProvider)
{ {
_shardingRuntimeContext = shardingRuntimeContext; _shardingRuntimeContext = shardingRuntimeContext;
} }
#endif #endif
#if EFCORE3 #if NETCOREAPP3_0
public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, logger, commandLogger, databaseProvider) public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ICurrentDbContext currentContext, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDiagnosticsLogger<DbLoggerCategory.Database.Command> commandLogger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, currentContext, logger, commandLogger, databaseProvider)
{ {
_shardingRuntimeContext = shardingRuntimeContext; _shardingRuntimeContext = shardingRuntimeContext;
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, logger, databaseProvider) public ShardingMigrator(IShardingRuntimeContext shardingRuntimeContext, IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, IDiagnosticsLogger<DbLoggerCategory.Migrations> logger, IDatabaseProvider databaseProvider) : base(migrationsAssembly, historyRepository, databaseCreator, migrationsSqlGenerator, rawSqlCommandBuilder, migrationCommandExecutor, connection, sqlGenerationHelper, logger, databaseProvider)
{ {
@ -81,7 +81,7 @@ namespace ShardingCore.EFCores
await DynamicShardingHelper.DynamicMigrateWithDataSourcesAsync(_shardingRuntimeContext, allDataSourceNames, null,cancellationToken); await DynamicShardingHelper.DynamicMigrateWithDataSourcesAsync(_shardingRuntimeContext, allDataSourceNames, null,cancellationToken);
} }
#if EFCORE6 || EFCORE5 #if NET6_0 || NET5_0
public override string GenerateScript(string fromMigration = null, string toMigration = null, public override string GenerateScript(string fromMigration = null, string toMigration = null,
MigrationsSqlGenerationOptions options = MigrationsSqlGenerationOptions.Default) MigrationsSqlGenerationOptions options = MigrationsSqlGenerationOptions.Default)
@ -89,7 +89,7 @@ namespace ShardingCore.EFCores
return new ScriptMigrationGenerator(_shardingRuntimeContext, fromMigration, toMigration, options).GenerateScript(); return new ScriptMigrationGenerator(_shardingRuntimeContext, fromMigration, toMigration, options).GenerateScript();
} }
#endif #endif
#if EFCORE3 || EFCORE2 #if NETCOREAPP3_0 || NETCOREAPP2_0
public override string GenerateScript(string fromMigration = null, string toMigration = null, bool idempotent = false) public override string GenerateScript(string fromMigration = null, string toMigration = null, bool idempotent = false)
{ {
return new ScriptMigrationGenerator(_shardingRuntimeContext, fromMigration, toMigration, idempotent).GenerateScript(); return new ScriptMigrationGenerator(_shardingRuntimeContext, fromMigration, toMigration, idempotent).GenerateScript();

View File

@ -38,7 +38,7 @@ namespace ShardingCore.EFCores
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public TResult ExecuteAsync<TResult>(Expression query, CancellationToken cancellationToken) public TResult ExecuteAsync<TResult>(Expression query, CancellationToken cancellationToken)
{ {
@ -59,7 +59,7 @@ namespace ShardingCore.EFCores
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(Expression query) public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(Expression query)
{ {
return _shardingCompilerExecutor.ExecuteAsync<TResult>(_shardingDbContext, query); return _shardingCompilerExecutor.ExecuteAsync<TResult>(_shardingDbContext, query);

View File

@ -18,10 +18,10 @@ namespace ShardingCore.EFCores
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE6 #if NET6_0
public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext
{ {
@ -38,7 +38,7 @@ namespace ShardingCore.EFCores
} }
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext
{ {
@ -55,7 +55,7 @@ namespace ShardingCore.EFCores
} }
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext public class ShardingRelationalTransactionFactory<TShardingDbContext> : RelationalTransactionFactory where TShardingDbContext : DbContext, IShardingDbContext
{ {

View File

@ -27,7 +27,7 @@ namespace ShardingCore.EFCores
{ {
private readonly IRelationalConnection _relationalConnection; private readonly IRelationalConnection _relationalConnection;
private readonly IShardingDbContext _shardingDbContext; private readonly IShardingDbContext _shardingDbContext;
#if !EFCORE2 #if !NETCOREAPP2_0
public ShardingRelationalTransactionManager(IRelationalConnection relationalConnection) public ShardingRelationalTransactionManager(IRelationalConnection relationalConnection)
{ {
_relationalConnection = relationalConnection; _relationalConnection = relationalConnection;
@ -35,7 +35,7 @@ namespace ShardingCore.EFCores
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public ShardingRelationalTransactionManager(IRelationalConnection relationalConnection) public ShardingRelationalTransactionManager(IRelationalConnection relationalConnection)
{ {
_relationalConnection = relationalConnection; _relationalConnection = relationalConnection;
@ -99,7 +99,7 @@ namespace ShardingCore.EFCores
_shardingDbContext.NotifyShardingTransaction(); _shardingDbContext.NotifyShardingTransaction();
return dbContextTransaction; return dbContextTransaction;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public Task ResetStateAsync(CancellationToken cancellationToken = new CancellationToken()) public Task ResetStateAsync(CancellationToken cancellationToken = new CancellationToken())
{ {
@ -112,7 +112,7 @@ namespace ShardingCore.EFCores
_shardingDbContext.NotifyShardingTransaction(); _shardingDbContext.NotifyShardingTransaction();
return dbContextTransaction; return dbContextTransaction;
} }
#if !EFCORE3 #if !NETCOREAPP3_0
public Task CommitTransactionAsync(CancellationToken cancellationToken = new CancellationToken()) public Task CommitTransactionAsync(CancellationToken cancellationToken = new CancellationToken())
{ {

View File

@ -32,21 +32,21 @@ namespace ShardingCore.Extensions
/// <param name="dbContext"></param> /// <param name="dbContext"></param>
public static void RemoveDbContextRelationModelThatIsShardingTable(this DbContext dbContext) public static void RemoveDbContextRelationModelThatIsShardingTable(this DbContext dbContext)
{ {
#if !EFCORE2&&!EFCORE3&&!EFCORE5&&!EFCORE6 #if !NETCOREAPP2_0&&!NETCOREAPP3_0&&!NET5_0&&!NET6_0
throw new NotImplementedException(); throw new NotImplementedException();
#endif #endif
#if EFCORE6 #if NET6_0
var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ; var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ;
#endif #endif
#if EFCORE2 || EFCORE3 || EFCORE5 #if NETCOREAPP2_0 || NETCOREAPP3_0 || NET5_0
var contextModel = dbContext.Model as Model; var contextModel = dbContext.Model as Model;
#endif #endif
var shardingRuntimeContext = dbContext.GetShardingRuntimeContext(); var shardingRuntimeContext = dbContext.GetShardingRuntimeContext();
var entityMetadataManager = shardingRuntimeContext.GetEntityMetadataManager(); var entityMetadataManager = shardingRuntimeContext.GetEntityMetadataManager();
#if EFCORE6 #if NET6_0
var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel; var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel;
var valueTuples = var valueTuples =
contextModelRelationalModel.Tables.Where(o =>o.Value.EntityTypeMappings.Any(m => entityMetadataManager.IsShardingTable(m.EntityType.ClrType))).Select(o => o.Key).ToList(); contextModelRelationalModel.Tables.Where(o =>o.Value.EntityTypeMappings.Any(m => entityMetadataManager.IsShardingTable(m.EntityType.ClrType))).Select(o => o.Key).ToList();
@ -55,7 +55,7 @@ namespace ShardingCore.Extensions
contextModelRelationalModel.Tables.Remove(valueTuples[i]); contextModelRelationalModel.Tables.Remove(valueTuples[i]);
} }
#endif #endif
#if EFCORE5 #if NET5_0
var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel; var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel;
var valueTuples = var valueTuples =
contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => entityMetadataManager.IsShardingTable(m.EntityType.ClrType))).Select(o => o.Key).ToList(); contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => entityMetadataManager.IsShardingTable(m.EntityType.ClrType))).Select(o => o.Key).ToList();
@ -64,7 +64,7 @@ namespace ShardingCore.Extensions
contextModelRelationalModel.Tables.Remove(valueTuples[i]); contextModelRelationalModel.Tables.Remove(valueTuples[i]);
} }
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
var entityTypes = var entityTypes =
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>; contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
var list = entityTypes.Where(o=>entityMetadataManager.IsShardingTable(o.Value.ClrType)).Select(o=>o.Key).ToList(); var list = entityTypes.Where(o=>entityMetadataManager.IsShardingTable(o.Value.ClrType)).Select(o=>o.Key).ToList();
@ -81,23 +81,23 @@ namespace ShardingCore.Extensions
// /// <param name="dbContext"></param> // /// <param name="dbContext"></param>
// public static void RemoveDbContextAllRelationModel(this DbContext dbContext) // public static void RemoveDbContextAllRelationModel(this DbContext dbContext)
// { // {
//#if EFCORE6 //#if NET6_0
// var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ; // var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ;
//#endif //#endif
//#if EFCORE2 || EFCORE3 || EFCORE5 //#if NETCOREAPP2_0 || NETCOREAPP3_0 || NET5_0
// var contextModel = dbContext.Model as Model; // var contextModel = dbContext.Model as Model;
//#endif //#endif
//#if EFCORE6 //#if NET6_0
// var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel; // var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel;
// contextModelRelationalModel.Tables.Clear(); // contextModelRelationalModel.Tables.Clear();
//#endif //#endif
//#if EFCORE5 //#if NET5_0
// var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel; // var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel;
// contextModelRelationalModel.Tables.Clear(); // contextModelRelationalModel.Tables.Clear();
//#endif //#endif
//#if EFCORE2 || EFCORE3 //#if NETCOREAPP2_0 || NETCOREAPP3_0
// var entityTypes = // var entityTypes =
// contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>; // contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
// entityTypes.Clear(); // entityTypes.Clear();
@ -109,21 +109,21 @@ namespace ShardingCore.Extensions
/// <param name="dbContext"></param> /// <param name="dbContext"></param>
public static void RemoveDbContextAllRelationModelWithoutShardingDataSourceOnly(this DbContext dbContext) public static void RemoveDbContextAllRelationModelWithoutShardingDataSourceOnly(this DbContext dbContext)
{ {
#if !EFCORE2&&!EFCORE3&&!EFCORE5&&!EFCORE6 #if !NETCOREAPP2_0&&!NETCOREAPP3_0&&!NET5_0&&!NET6_0
throw new NotImplementedException(); throw new NotImplementedException();
#endif #endif
#if EFCORE6 #if NET6_0
var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ; var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ;
#endif #endif
#if EFCORE2 || EFCORE3 || EFCORE5 #if NETCOREAPP2_0 || NETCOREAPP3_0 || NET5_0
var contextModel = dbContext.Model as Model; var contextModel = dbContext.Model as Model;
#endif #endif
var shardingRuntimeContext = dbContext.GetShardingRuntimeContext(); var shardingRuntimeContext = dbContext.GetShardingRuntimeContext();
var entityMetadataManager = shardingRuntimeContext.GetEntityMetadataManager(); var entityMetadataManager = shardingRuntimeContext.GetEntityMetadataManager();
#if EFCORE6 #if NET6_0
var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel; var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel;
var valueTuples = var valueTuples =
contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => !entityMetadataManager.IsShardingDataSource(m.EntityType.ClrType) ||entityMetadataManager.TryGet(m.EntityType.ClrType)==null)).Select(o => o.Key).ToList(); contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => !entityMetadataManager.IsShardingDataSource(m.EntityType.ClrType) ||entityMetadataManager.TryGet(m.EntityType.ClrType)==null)).Select(o => o.Key).ToList();
@ -132,7 +132,7 @@ namespace ShardingCore.Extensions
contextModelRelationalModel.Tables.Remove(valueTuples[i]); contextModelRelationalModel.Tables.Remove(valueTuples[i]);
} }
#endif #endif
#if EFCORE5 #if NET5_0
var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel; var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel;
var valueTuples = var valueTuples =
contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => !entityMetadataManager.IsShardingDataSource(m.EntityType.ClrType)||entityMetadataManager.TryGet(m.EntityType.ClrType)==null)).Select(o => o.Key).ToList(); contextModelRelationalModel.Tables.Where(o => o.Value.EntityTypeMappings.Any(m => !entityMetadataManager.IsShardingDataSource(m.EntityType.ClrType)||entityMetadataManager.TryGet(m.EntityType.ClrType)==null)).Select(o => o.Key).ToList();
@ -141,7 +141,7 @@ namespace ShardingCore.Extensions
contextModelRelationalModel.Tables.Remove(valueTuples[i]); contextModelRelationalModel.Tables.Remove(valueTuples[i]);
} }
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
var entityTypes = var entityTypes =
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>; contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
var list = entityTypes.Where(o => !entityMetadataManager.IsShardingDataSource(o.Value.ClrType) || entityMetadataManager.TryGet(o.Value.ClrType) == null).Select(o => o.Key).ToList(); var list = entityTypes.Where(o => !entityMetadataManager.IsShardingDataSource(o.Value.ClrType) || entityMetadataManager.TryGet(o.Value.ClrType) == null).Select(o => o.Key).ToList();
@ -157,27 +157,27 @@ namespace ShardingCore.Extensions
/// <param name="dbContext"></param> /// <param name="dbContext"></param>
public static void RemoveDbContextAllRelationModel(this DbContext dbContext) public static void RemoveDbContextAllRelationModel(this DbContext dbContext)
{ {
#if !EFCORE2&&!EFCORE3&&!EFCORE5&&!EFCORE6 #if !NETCOREAPP2_0&&!NETCOREAPP3_0&&!NET5_0&&!NET6_0
throw new NotImplementedException(); throw new NotImplementedException();
#endif #endif
#if EFCORE6 #if NET6_0
var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ; var contextModel = dbContext.GetService<IDesignTimeModel>().Model; ;
#endif #endif
#if EFCORE2 || EFCORE3 || EFCORE5 #if NETCOREAPP2_0 || NETCOREAPP3_0 || NET5_0
var contextModel = dbContext.Model as Model; var contextModel = dbContext.Model as Model;
#endif #endif
#if EFCORE6 #if NET6_0
var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel; var contextModelRelationalModel = contextModel.GetRelationalModel() as RelationalModel;
contextModelRelationalModel.Tables.Clear(); contextModelRelationalModel.Tables.Clear();
#endif #endif
#if EFCORE5 #if NET5_0
var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel; var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel;
contextModelRelationalModel.Tables.Clear(); contextModelRelationalModel.Tables.Clear();
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
var entityTypes = var entityTypes =
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>; contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
entityTypes.Clear(); entityTypes.Clear();
@ -192,14 +192,14 @@ namespace ShardingCore.Extensions
public static void RemoveDbContextRelationModelSaveOnlyThatIsNamedType(this DbContext dbContext, public static void RemoveDbContextRelationModelSaveOnlyThatIsNamedType(this DbContext dbContext,
Type shardingType) Type shardingType)
{ {
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
1 1
#endif #endif
#if EFCORE2 ||EFCORE3 ||EFCORE5 #if NETCOREAPP2_0 ||NETCOREAPP3_0 ||NET5_0
var contextModel = dbContext.Model as Model; var contextModel = dbContext.Model as Model;
#endif #endif
#if EFCORE6 #if NET6_0
var contextModel = dbContext.GetService<IDesignTimeModel>().Model; var contextModel = dbContext.GetService<IDesignTimeModel>().Model;
var entityTypes = contextModel.GetEntityTypes(); var entityTypes = contextModel.GetEntityTypes();
foreach (var entityType in entityTypes) foreach (var entityType in entityTypes)
@ -220,7 +220,7 @@ namespace ShardingCore.Extensions
} }
#endif #endif
#if EFCORE5 #if NET5_0
var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel; var contextModelRelationalModel = contextModel.RelationalModel as RelationalModel;
var entityTypes = contextModel.GetEntityTypes(); var entityTypes = contextModel.GetEntityTypes();
@ -239,7 +239,7 @@ namespace ShardingCore.Extensions
contextModelRelationalModel.Tables.Remove(valueTuples[i]); contextModelRelationalModel.Tables.Remove(valueTuples[i]);
} }
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
var entityTypes = var entityTypes =
contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>; contextModel.GetFieldValue("_entityTypes") as SortedDictionary<string, EntityType>;
@ -270,10 +270,10 @@ namespace ShardingCore.Extensions
/// <param name="dbContext"></param> /// <param name="dbContext"></param>
public static void RemoveModelCache(this DbContext dbContext) public static void RemoveModelCache(this DbContext dbContext)
{ {
#if !EFCORE2&&!EFCORE3&&!EFCORE5&&!EFCORE6 #if !NETCOREAPP2_0&&!NETCOREAPP3_0&&!NET5_0&&!NET6_0
throw new NotImplementedException(); throw new NotImplementedException();
#endif #endif
#if EFCORE6 #if NET6_0
var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource; var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource;
var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory(); var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory();
object key1 = modelCacheKeyFactory.Create(dbContext,true); object key1 = modelCacheKeyFactory.Create(dbContext,true);
@ -281,13 +281,13 @@ namespace ShardingCore.Extensions
object key2 = modelCacheKeyFactory.Create(dbContext,false); object key2 = modelCacheKeyFactory.Create(dbContext,false);
shardingModelSource.Remove(key2); shardingModelSource.Remove(key2);
#endif #endif
#if EFCORE5 #if NET5_0
var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource; var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource;
var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory(); var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory();
object key1 = modelCacheKeyFactory.Create(dbContext); object key1 = modelCacheKeyFactory.Create(dbContext);
shardingModelSource.Remove(key1); shardingModelSource.Remove(key1);
#endif #endif
#if EFCORE3 #if NETCOREAPP3_0
var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource; var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource;
var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory(); var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory();
@ -295,7 +295,7 @@ namespace ShardingCore.Extensions
shardingModelSource.Remove(key1); shardingModelSource.Remove(key1);
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource; var shardingModelSource = dbContext.GetService<IModelSource>() as IShardingModelSource;
var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory(); var modelCacheKeyFactory = shardingModelSource.GetModelCacheKeyFactory();

View File

@ -17,10 +17,10 @@ namespace ShardingCore.Extensions.InternalExtensions
/// <returns></returns> /// <returns></returns>
public static string GetEntityTypeTableName(this IEntityType entityType) public static string GetEntityTypeTableName(this IEntityType entityType)
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
var tableName = entityType.GetTableName(); var tableName = entityType.GetTableName();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var tableName = entityType.Relational().TableName; var tableName = entityType.Relational().TableName;
#endif #endif
return tableName; return tableName;

View File

@ -16,7 +16,7 @@ namespace ShardingCore.Extensions
//public static void ForEach<T>(this IEnumerable<T> source) //public static void ForEach<T>(this IEnumerable<T> source)
#if !EFCORE5 #if !NET5_0
public static HashSet<TSource> ToHashSet<TSource>( public static HashSet<TSource> ToHashSet<TSource>(
this IEnumerable<TSource> source, this IEnumerable<TSource> source,
IEqualityComparer<TSource> comparer = null) IEqualityComparer<TSource> comparer = null)

View File

@ -64,10 +64,10 @@ namespace ShardingCore.Extensions
{ {
return null; return null;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
return expression.Print(); return expression.Print();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
return expression.ToString(); return expression.ToString();
#endif #endif
} }

View File

@ -10,10 +10,10 @@ namespace ShardingCore.Extensions
{ {
public static async Task<List<TEntity>> ToStreamListAsync<TEntity>(this IAsyncEnumerable<TEntity> source, int? take=null,CancellationToken cancellationToken=default) public static async Task<List<TEntity>> ToStreamListAsync<TEntity>(this IAsyncEnumerable<TEntity> source, int? take=null,CancellationToken cancellationToken=default)
{ {
#if EFCORE2 #if NETCOREAPP2_0
var list = await source.ToList<TEntity>(cancellationToken); var list = await source.ToList<TEntity>(cancellationToken);
#endif #endif
#if !EFCORE2 #if !NETCOREAPP2_0
var list = new List<TEntity>(take??4); var list = new List<TEntity>(take??4);
await foreach (var element in source.WithCancellation(cancellationToken)) await foreach (var element in source.WithCancellation(cancellationToken))
{ {
@ -45,7 +45,7 @@ namespace ShardingCore.Extensions
public static async Task<FixedElementCollection<TEntity>> ToFixedElementStreamListAsync<TEntity>(this IAsyncEnumerable<TEntity> source,int capacity,int maxVirtualElementCount,CancellationToken cancellationToken=default) public static async Task<FixedElementCollection<TEntity>> ToFixedElementStreamListAsync<TEntity>(this IAsyncEnumerable<TEntity> source,int capacity,int maxVirtualElementCount,CancellationToken cancellationToken=default)
{ {
var fixedElementCollection = new FixedElementCollection<TEntity>(capacity); var fixedElementCollection = new FixedElementCollection<TEntity>(capacity);
#if EFCORE2 #if NETCOREAPP2_0
var asyncEnumerator = source.GetEnumerator(); var asyncEnumerator = source.GetEnumerator();
while (await asyncEnumerator.MoveNext(cancellationToken)) while (await asyncEnumerator.MoveNext(cancellationToken))
{ {
@ -56,7 +56,7 @@ namespace ShardingCore.Extensions
} }
} }
#endif #endif
#if !EFCORE2 #if !NETCOREAPP2_0
await foreach (var element in source.WithCancellation(cancellationToken)) await foreach (var element in source.WithCancellation(cancellationToken))
{ {
fixedElementCollection.Add(element); fixedElementCollection.Add(element);

View File

@ -25,14 +25,14 @@ namespace ShardingCore.Helpers
if (obj.GetType() != this.GetType()) return false; if (obj.GetType() != this.GetType()) return false;
return Equals((MigrationReplaceItem)obj); return Equals((MigrationReplaceItem)obj);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {
return HashCode.Combine(SourceName, TargetName); return HashCode.Combine(SourceName, TargetName);
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override int GetHashCode() public override int GetHashCode()
{ {

View File

@ -102,7 +102,7 @@ namespace ShardingCore.Sharding
#if !EFCORE2 #if !NETCOREAPP2_0
public override ValueTask<EntityEntry<TEntity>> AddAsync<TEntity>(TEntity entity, CancellationToken cancellationToken = new CancellationToken()) public override ValueTask<EntityEntry<TEntity>> AddAsync<TEntity>(TEntity entity, CancellationToken cancellationToken = new CancellationToken())
{ {
@ -118,7 +118,7 @@ namespace ShardingCore.Sharding
return CreateGenericDbContext(entity).AddAsync(entity, cancellationToken); return CreateGenericDbContext(entity).AddAsync(entity, cancellationToken);
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public override Task<EntityEntry<TEntity>> AddAsync<TEntity>(TEntity entity, CancellationToken cancellationToken = new CancellationToken()) public override Task<EntityEntry<TEntity>> AddAsync<TEntity>(TEntity entity, CancellationToken cancellationToken = new CancellationToken())
{ {
if (IsExecutor) if (IsExecutor)
@ -429,11 +429,11 @@ namespace ShardingCore.Sharding
{ {
using (var tran = await Database.BeginTransactionAsync(cancellationToken)) using (var tran = await Database.BeginTransactionAsync(cancellationToken))
{ {
i = await ShardingDbContextExecutor.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken); i = await ShardingDbContextExecutor.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken);
#if EFCORE2 #if NETCOREAPP2_0
tran.Commit(); tran.Commit();
#endif #endif
#if !EFCORE2 #if !NETCOREAPP2_0
await tran.CommitAsync(cancellationToken); await tran.CommitAsync(cancellationToken);
#endif #endif
} }
@ -460,7 +460,7 @@ namespace ShardingCore.Sharding
base.Dispose(); base.Dispose();
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public override async ValueTask DisposeAsync() public override async ValueTask DisposeAsync()
{ {

View File

@ -20,7 +20,7 @@ namespace ShardingCore.Sharding.Abstractions
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
TResult Execute<TResult>(IShardingDbContext shardingDbContext, Expression query); TResult Execute<TResult>(IShardingDbContext shardingDbContext, Expression query);
#if !EFCORE2 #if !NETCOREAPP2_0
/// <summary> /// <summary>
/// execute query async /// execute query async
/// </summary> /// </summary>
@ -31,7 +31,7 @@ namespace ShardingCore.Sharding.Abstractions
/// <returns></returns> /// <returns></returns>
TResult ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query, CancellationToken cancellationToken = new CancellationToken()); TResult ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query, CancellationToken cancellationToken = new CancellationToken());
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
/// <summary> /// <summary>
/// execute query async /// execute query async
/// </summary> /// </summary>

View File

@ -18,7 +18,7 @@ namespace ShardingCore.Sharding.Abstractions
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
public interface IShardingDbContextExecutor : IDisposable public interface IShardingDbContextExecutor : IDisposable
#if !EFCORE2 #if !NETCOREAPP2_0
, IAsyncDisposable , IAsyncDisposable
#endif #endif
@ -78,7 +78,7 @@ namespace ShardingCore.Sharding.Abstractions
void Commit(); void Commit();
IDictionary<string, IDataSourceDbContext> GetCurrentDbContexts(); IDictionary<string, IDataSourceDbContext> GetCurrentDbContexts();
#if !EFCORE2 #if !NETCOREAPP2_0
/// <summary> /// <summary>
/// rollback async /// rollback async
/// </summary> /// </summary>

View File

@ -5,7 +5,7 @@ using ShardingCore.Sharding.Enumerators;
using ShardingCore.Sharding.ShardingExecutors; using ShardingCore.Sharding.ShardingExecutors;
using ShardingCore.Sharding.ShardingExecutors.Abstractions; using ShardingCore.Sharding.ShardingExecutors.Abstractions;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Internal;
#endif #endif

View File

@ -17,7 +17,7 @@ namespace ShardingCore.Sharding.Abstractions
/// <param name="queryCompilerContext"></param> /// <param name="queryCompilerContext"></param>
/// <returns></returns> /// <returns></returns>
TResult Execute<TResult>(IQueryCompilerContext queryCompilerContext); TResult Execute<TResult>(IQueryCompilerContext queryCompilerContext);
#if !EFCORE2 #if !NETCOREAPP2_0
/// <summary> /// <summary>
/// execute query async /// execute query async
/// </summary> /// </summary>
@ -30,7 +30,7 @@ namespace ShardingCore.Sharding.Abstractions
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
/// <summary> /// <summary>
/// execute query async /// execute query async
/// </summary> /// </summary>

View File

@ -18,7 +18,7 @@ namespace ShardingCore.Sharding.Abstractions
void NotifyShardingTransaction(); void NotifyShardingTransaction();
void Rollback(); void Rollback();
void Commit(); void Commit();
#if !EFCORE2 #if !NETCOREAPP2_0
Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()); Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken());
Task CommitAsync(CancellationToken cancellationToken = new CancellationToken()); Task CommitAsync(CancellationToken cancellationToken = new CancellationToken());
#endif #endif

View File

@ -22,7 +22,7 @@ namespace ShardingCore.Sharding.Abstractions
// void NotifyShardingTransaction(); // void NotifyShardingTransaction();
// void Rollback(); // void Rollback();
// void Commit(); // void Commit();
//#if !EFCORE2 //#if !NETCOREAPP2_0
// Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()); // Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken());
// Task CommitAsync(CancellationToken cancellationToken = new CancellationToken()); // Task CommitAsync(CancellationToken cancellationToken = new CancellationToken());
//#endif //#endif

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using ShardingCore.Exceptions; using ShardingCore.Exceptions;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Internal;
#endif #endif

View File

@ -5,7 +5,7 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync.EFCore2x namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync.NETCOREAPP2_0x
{ {
/* /*
* @Author: xjm * @Author: xjm
@ -14,13 +14,13 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync.EFCore2x
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if EFCORE2 #if NETCOREAPP2_0
internal class EFCore2TryCurrentAsyncEnumerator<T>:IAsyncEnumerator<T> internal class NETCOREAPP2_0TryCurrentAsyncEnumerator<T>:IAsyncEnumerator<T>
{ {
private readonly IAsyncEnumerator<T> _asyncEnumerator; private readonly IAsyncEnumerator<T> _asyncEnumerator;
private bool currentMoved=false; private bool currentMoved=false;
public EFCore2TryCurrentAsyncEnumerator(IAsyncEnumerator<T> asyncEnumerator) public NETCOREAPP2_0TryCurrentAsyncEnumerator(IAsyncEnumerator<T> asyncEnumerator)
{ {
_asyncEnumerator = asyncEnumerator; _asyncEnumerator = asyncEnumerator;
} }

View File

@ -34,10 +34,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
private async Task<IEnumerator<T>> GetAllRowsAsync(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator) private async Task<IEnumerator<T>> GetAllRowsAsync(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator)
{ {
var list = new List<T>(); var list = new List<T>();
#if !EFCORE2 #if !NETCOREAPP2_0
while (await streamMergeAsyncEnumerator.MoveNextAsync()) while (await streamMergeAsyncEnumerator.MoveNextAsync())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
while (await streamMergeAsyncEnumerator.MoveNext(new CancellationToken())) while (await streamMergeAsyncEnumerator.MoveNext(new CancellationToken()))
#endif #endif
{ {
@ -49,10 +49,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
private IEnumerator<T> GetAllRows(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator) private IEnumerator<T> GetAllRows(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator)
{ {
var list = new List<T>(); var list = new List<T>();
#if !EFCORE2 #if !NETCOREAPP2_0
while ( streamMergeAsyncEnumerator.MoveNext()) while ( streamMergeAsyncEnumerator.MoveNext())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
while (streamMergeAsyncEnumerator.MoveNext()) while (streamMergeAsyncEnumerator.MoveNext())
#endif #endif
{ {
@ -76,7 +76,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
return _inMemoryReallyCount; return _inMemoryReallyCount;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
@ -134,7 +134,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
return _inMemoryEnumerator.Current; return _inMemoryEnumerator.Current;
} }
#if EFCORE2 #if NETCOREAPP2_0
public void Dispose() public void Dispose()
{ {
_inMemoryEnumerator?.Dispose(); _inMemoryEnumerator?.Dispose();

View File

@ -30,7 +30,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
return _inMemoryReallyCount; return _inMemoryReallyCount;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {
@ -56,7 +56,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
return _reverseEnumerator.MoveNext(); return _reverseEnumerator.MoveNext();
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public async Task<bool> MoveNext(CancellationToken cancellationToken) public async Task<bool> MoveNext(CancellationToken cancellationToken)
{ {
if (_first) if (_first)

View File

@ -33,10 +33,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
private async Task<IEnumerator<T>> GetAllRowsAsync(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator) private async Task<IEnumerator<T>> GetAllRowsAsync(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator)
{ {
var list = new List<T>(); var list = new List<T>();
#if !EFCORE2 #if !NETCOREAPP2_0
while (await streamMergeAsyncEnumerator.MoveNextAsync()) while (await streamMergeAsyncEnumerator.MoveNextAsync())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
while (await streamMergeAsyncEnumerator.MoveNext(new CancellationToken())) while (await streamMergeAsyncEnumerator.MoveNext(new CancellationToken()))
#endif #endif
{ {
@ -48,10 +48,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
private IEnumerator<T> GetAllRows(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator) private IEnumerator<T> GetAllRows(IStreamMergeAsyncEnumerator<T> streamMergeAsyncEnumerator)
{ {
var list = new List<T>(); var list = new List<T>();
#if !EFCORE2 #if !NETCOREAPP2_0
while ( streamMergeAsyncEnumerator.MoveNext()) while ( streamMergeAsyncEnumerator.MoveNext())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
while (streamMergeAsyncEnumerator.MoveNext()) while (streamMergeAsyncEnumerator.MoveNext())
#endif #endif
{ {
@ -75,7 +75,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
return _inMemoryReallyCount; return _inMemoryReallyCount;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
@ -133,7 +133,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
return _inMemoryEnumerator.Current; return _inMemoryEnumerator.Current;
} }
#if EFCORE2 #if NETCOREAPP2_0
public void Dispose() public void Dispose()
{ {
_inMemoryEnumerator?.Dispose(); _inMemoryEnumerator?.Dispose();

View File

@ -58,19 +58,19 @@ namespace ShardingCore.Sharding.Enumerators
return _mergeContext.SelectContext.SelectProperties.Where(o => !(o is SelectAggregateProperty)) return _mergeContext.SelectContext.SelectProperties.Where(o => !(o is SelectAggregateProperty))
.Select(o => first.GetValueByExpression(o.PropertyName).value).ToList(); .Select(o => first.GetValueByExpression(o.PropertyName).value).ToList();
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask<bool> MoveNextAsync() public async ValueTask<bool> MoveNextAsync()
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken()) public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
#endif #endif
{ {
if (_queue.IsEmpty()) if (_queue.IsEmpty())
return false; return false;
#if !EFCORE2 #if !NETCOREAPP2_0
var hasNext = await SetCurrentValueAsync(); var hasNext = await SetCurrentValueAsync();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var hasNext = await SetCurrentValueAsync(cancellationToken); var hasNext = await SetCurrentValueAsync(cancellationToken);
#endif #endif
if (hasNext) if (hasNext)
@ -91,10 +91,10 @@ namespace ShardingCore.Sharding.Enumerators
return true; return true;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
private async ValueTask<bool> SetCurrentValueAsync() private async ValueTask<bool> SetCurrentValueAsync()
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
private async Task<bool> SetCurrentValueAsync(CancellationToken cancellationToken = new CancellationToken()) private async Task<bool> SetCurrentValueAsync(CancellationToken cancellationToken = new CancellationToken())
#endif #endif
{ {
@ -106,10 +106,10 @@ namespace ShardingCore.Sharding.Enumerators
currentValues.Add(current); currentValues.Add(current);
var first = _queue.Poll(); var first = _queue.Poll();
#if !EFCORE2 #if !NETCOREAPP2_0
if (await first.MoveNextAsync()) if (await first.MoveNextAsync())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
if (await first.MoveNext(cancellationToken)) if (await first.MoveNext(cancellationToken))
#endif #endif
{ {
@ -240,7 +240,7 @@ namespace ShardingCore.Sharding.Enumerators
return CurrentValue; return CurrentValue;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {

View File

@ -45,10 +45,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
_currentEnumerator = _queue.IsEmpty() ? _enumerators.FirstOrDefault() : _queue.Peek(); _currentEnumerator = _queue.IsEmpty() ? _enumerators.FirstOrDefault() : _queue.Peek();
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask<bool> MoveNextAsync() public async ValueTask<bool> MoveNextAsync()
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken()) public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
#endif #endif
{ {
@ -61,11 +61,11 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
} }
var first = _queue.Poll(); var first = _queue.Poll();
#if !EFCORE2 #if !NETCOREAPP2_0
if (await first.MoveNextAsync()) if (await first.MoveNextAsync())
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
if (await first.MoveNext(cancellationToken)) if (await first.MoveNext(cancellationToken))
#endif #endif
@ -128,7 +128,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
return _currentEnumerator.GetCurrent(); return _currentEnumerator.GetCurrent();
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {

View File

@ -30,7 +30,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
_moveIndex++; _moveIndex++;
return HasElement(); return HasElement();
} }
#if !EFCORE2&&!EFCORE3&&!EFCORE5 #if !NETCOREAPP2_0&&!NETCOREAPP3_0&&!NET5_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
return ValueTask.CompletedTask; return ValueTask.CompletedTask;
@ -46,7 +46,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
} }
#endif #endif
#if EFCORE3 || EFCORE5 #if NETCOREAPP3_0 || NET5_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
return new ValueTask(); return new ValueTask();
@ -100,7 +100,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
return _constantElement; return _constantElement;
} }
#if EFCORE2 #if NETCOREAPP2_0
public void Dispose() public void Dispose()
{ {
} }

View File

@ -37,17 +37,17 @@ namespace ShardingCore.Sharding.Enumerators
_orderValues = HasElement() ? GetCurrentOrderValues() : new List<IComparable>(0); _orderValues = HasElement() ? GetCurrentOrderValues() : new List<IComparable>(0);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask<bool> MoveNextAsync() public async ValueTask<bool> MoveNextAsync()
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken()) public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
#endif #endif
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
var has = await _enumerator.MoveNextAsync(); var has = await _enumerator.MoveNextAsync();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var has = await _enumerator.MoveNext(cancellationToken); var has = await _enumerator.MoveNext(cancellationToken);
#endif #endif
SetOrderValues(); SetOrderValues();
@ -134,7 +134,7 @@ namespace ShardingCore.Sharding.Enumerators
{ {
return _orderValues ?? new List<IComparable>(0); return _orderValues ?? new List<IComparable>(0);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
return _enumerator.DisposeAsync(); return _enumerator.DisposeAsync();

View File

@ -34,20 +34,20 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
else else
_enumerator = new MultiOrderStreamMergeAsyncEnumerator<T>(_mergeContext, sources); _enumerator = new MultiOrderStreamMergeAsyncEnumerator<T>(_mergeContext, sources);
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask<bool> MoveNextAsync() public async ValueTask<bool> MoveNextAsync()
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken()) public async Task<bool> MoveNext(CancellationToken cancellationToken = new CancellationToken())
#endif #endif
{ {
//如果合并数据的时候不需要跳过也没有take多少那么就是直接next //如果合并数据的时候不需要跳过也没有take多少那么就是直接next
while (_skip.GetValueOrDefault() > this.realSkip) while (_skip.GetValueOrDefault() > this.realSkip)
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
var has = await _enumerator.MoveNextAsync(); var has = await _enumerator.MoveNextAsync();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var has = await _enumerator.MoveNext(cancellationToken); var has = await _enumerator.MoveNext(cancellationToken);
#endif #endif
@ -56,10 +56,10 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
return false; return false;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
var next = await _enumerator.MoveNextAsync(); var next = await _enumerator.MoveNextAsync();
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var next = await _enumerator.MoveNext(cancellationToken); var next = await _enumerator.MoveNext(cancellationToken);
#endif #endif
@ -129,7 +129,7 @@ namespace ShardingCore.Sharding.Enumerators.StreamMergeAsync
{ {
_enumerator.Dispose(); _enumerator.Dispose();
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {

View File

@ -48,7 +48,7 @@ namespace ShardingCore.Sharding.Enumerators
} }
return false; return false;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {
if (_asyncEnumerator) if (_asyncEnumerator)
@ -111,7 +111,7 @@ namespace ShardingCore.Sharding.Enumerators
if (_syncEnumerator) return _syncSource.Current; if (_syncEnumerator) return _syncSource.Current;
return default; return default;
} }
#if EFCORE2 #if NETCOREAPP2_0
public void Dispose() public void Dispose()
{ {
_asyncSource?.Dispose(); _asyncSource?.Dispose();

View File

@ -20,14 +20,14 @@ namespace ShardingCore.Sharding.Enumerators.TrackerEnumerables
_shardingDbContext = shardingDbContext; _shardingDbContext = shardingDbContext;
_asyncEnumerable = asyncEnumerable; _asyncEnumerable = asyncEnumerable;
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = new CancellationToken()) public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = new CancellationToken())
{ {
return new AsyncTrackerEnumerator<T>(_shardingDbContext,_asyncEnumerable.GetAsyncEnumerator(cancellationToken)); return new AsyncTrackerEnumerator<T>(_shardingDbContext,_asyncEnumerable.GetAsyncEnumerator(cancellationToken));
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public IAsyncEnumerator<T> GetEnumerator() public IAsyncEnumerator<T> GetEnumerator()
{ {
return new AsyncTrackerEnumerator<T>(_shardingDbContext, _asyncEnumerable.GetEnumerator()); return new AsyncTrackerEnumerator<T>(_shardingDbContext, _asyncEnumerable.GetEnumerator());

View File

@ -17,7 +17,7 @@ namespace ShardingCore.Sharding.Enumerators.TrackerEnumerators
* @Ver: 1.0 * @Ver: 1.0
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 #if !NETCOREAPP2_0
internal class AsyncTrackerEnumerator<T> : IAsyncEnumerator<T> internal class AsyncTrackerEnumerator<T> : IAsyncEnumerator<T>
{ {
@ -60,7 +60,7 @@ namespace ShardingCore.Sharding.Enumerators.TrackerEnumerators
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public class AsyncTrackerEnumerator<T> : IAsyncEnumerator<T> public class AsyncTrackerEnumerator<T> : IAsyncEnumerator<T>
{ {

View File

@ -13,7 +13,7 @@ using ShardingCore.Sharding.Abstractions;
using ShardingCore.Sharding.ShardingExecutors.Abstractions; using ShardingCore.Sharding.ShardingExecutors.Abstractions;
using ShardingCore.Sharding.Visitors.Selects; using ShardingCore.Sharding.Visitors.Selects;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Query.Sql; using Microsoft.EntityFrameworkCore.Query.Sql;
#endif #endif

View File

@ -9,7 +9,7 @@ namespace ShardingCore.Sharding.MergeEngines.Enumerables
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
public ValueTask DisposeAsync() public ValueTask DisposeAsync()
{ {
return new ValueTask(); return new ValueTask();
@ -20,7 +20,7 @@ namespace ShardingCore.Sharding.MergeEngines.Enumerables
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public Task<bool> MoveNext(CancellationToken cancellationToken) public Task<bool> MoveNext(CancellationToken cancellationToken)
{ {
return Task.FromResult(false); return Task.FromResult(false);

View File

@ -25,7 +25,7 @@ namespace ShardingCore.Sharding.MergeEngines.EnumeratorStreamMergeEngines
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = new CancellationToken()) public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = new CancellationToken())
{ {
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
@ -46,7 +46,7 @@ namespace ShardingCore.Sharding.MergeEngines.EnumeratorStreamMergeEngines
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
IAsyncEnumerator<T> IAsyncEnumerable<T>.GetEnumerator() IAsyncEnumerator<T> IAsyncEnumerable<T>.GetEnumerator()
{ {
if (!_mergeContext.TryPrepareExecuteContinueQuery(() => new EmptyQueryEnumerator<T>(),out var emptyQueryEnumerator)) if (!_mergeContext.TryPrepareExecuteContinueQuery(() => new EmptyQueryEnumerator<T>(),out var emptyQueryEnumerator))

View File

@ -5,13 +5,13 @@ using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using ShardingCore.Sharding.Enumerators; using ShardingCore.Sharding.Enumerators;
using ShardingCore.Sharding.Enumerators.StreamMergeAsync; using ShardingCore.Sharding.Enumerators.StreamMergeAsync;
using ShardingCore.Sharding.Enumerators.StreamMergeAsync.EFCore2x; using ShardingCore.Sharding.Enumerators.StreamMergeAsync.NETCOREAPP2_0x;
using ShardingCore.Sharding.MergeEngines.Common; using ShardingCore.Sharding.MergeEngines.Common;
using ShardingCore.Sharding.MergeEngines.Executors.Abstractions; using ShardingCore.Sharding.MergeEngines.Executors.Abstractions;
using ShardingCore.Sharding.MergeEngines.Executors.CircuitBreakers; using ShardingCore.Sharding.MergeEngines.Executors.CircuitBreakers;
using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions; using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions;
using ShardingCore.Sharding.ShardingExecutors; using ShardingCore.Sharding.ShardingExecutors;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Extensions.Internal; using Microsoft.EntityFrameworkCore.Extensions.Internal;
#endif #endif
@ -128,14 +128,14 @@ namespace ShardingCore.Sharding.MergeEngines.Executors.Enumerables.Abstractions
/// <returns></returns> /// <returns></returns>
public async Task<IAsyncEnumerator<TEntity>> GetAsyncEnumerator0(IQueryable<TEntity> newQueryable) public async Task<IAsyncEnumerator<TEntity>> GetAsyncEnumerator0(IQueryable<TEntity> newQueryable)
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
var enumator = newQueryable.AsAsyncEnumerable().GetAsyncEnumerator(); var enumator = newQueryable.AsAsyncEnumerable().GetAsyncEnumerator();
await enumator.MoveNextAsync(); await enumator.MoveNextAsync();
return enumator; return enumator;
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
var enumator = var enumator =
new EFCore2TryCurrentAsyncEnumerator<TEntity>(newQueryable.AsAsyncEnumerable().GetEnumerator()); new NETCOREAPP2_0TryCurrentAsyncEnumerator<TEntity>(newQueryable.AsAsyncEnumerable().GetEnumerator());
await enumator.MoveNext(); await enumator.MoveNext();
return enumator; return enumator;
#endif #endif

View File

@ -51,12 +51,12 @@ namespace ShardingCore.Sharding.MergeEngines.Executors.Methods
if (!resultType.IsNumericType()) if (!resultType.IsNumericType())
throw new ShardingCoreException( throw new ShardingCoreException(
$"not support {GetStreamMergeContext().MergeQueryCompilerContext.GetQueryExpression().ShardingPrint()} result {resultType}"); $"not support {GetStreamMergeContext().MergeQueryCompilerContext.GetQueryExpression().ShardingPrint()} result {resultType}");
#if !EFCORE2 #if !NETCOREAPP2_0
return ShardingEntityFrameworkQueryableExtensions.ExecuteAsync<TEntity, Task<TEntity>>( return ShardingEntityFrameworkQueryableExtensions.ExecuteAsync<TEntity, Task<TEntity>>(
ShardingQueryableMethods.GetSumWithoutSelector(resultType), (IQueryable<TEntity>)queryable, ShardingQueryableMethods.GetSumWithoutSelector(resultType), (IQueryable<TEntity>)queryable,
(Expression)null, cancellationToken); (Expression)null, cancellationToken);
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
return ShardingEntityFrameworkQueryableExtensions.ExecuteAsync<TEntity, TEntity>(ShardingQueryableMethods.GetSumWithoutSelector(resultType), (IQueryable<TEntity>)queryable, cancellationToken); return ShardingEntityFrameworkQueryableExtensions.ExecuteAsync<TEntity, TEntity>(ShardingQueryableMethods.GetSumWithoutSelector(resultType), (IQueryable<TEntity>)queryable, cancellationToken);
#endif #endif
} }

View File

@ -4,7 +4,7 @@ using System.Threading;
using ShardingCore.Sharding.Enumerators; using ShardingCore.Sharding.Enumerators;
using ShardingCore.Sharding.MergeEngines.Executors.Abstractions; using ShardingCore.Sharding.MergeEngines.Executors.Abstractions;
using ShardingCore.Sharding.MergeEngines.ShardingExecutors; using ShardingCore.Sharding.MergeEngines.ShardingExecutors;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Extensions.Internal; using Microsoft.EntityFrameworkCore.Extensions.Internal;
#endif #endif
@ -27,7 +27,7 @@ namespace ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions.S
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public IAsyncEnumerator<TEntity> GetAsyncEnumerator( public IAsyncEnumerator<TEntity> GetAsyncEnumerator(
CancellationToken cancellationToken = new CancellationToken()) CancellationToken cancellationToken = new CancellationToken())
{ {
@ -35,7 +35,7 @@ namespace ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions.S
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
IAsyncEnumerator<TEntity> IAsyncEnumerable<TEntity>.GetEnumerator() IAsyncEnumerator<TEntity> IAsyncEnumerable<TEntity>.GetEnumerator()
{ {
return GetStreamMergeAsyncEnumerator(true); return GetStreamMergeAsyncEnumerator(true);

View File

@ -23,7 +23,7 @@ namespace ShardingCore.Sharding.Parsers.Visitors
/// Author: xjm /// Author: xjm
/// Created: 2022/5/1 21:43:12 /// Created: 2022/5/1 21:43:12
/// Email: 326308290@qq.com /// Email: 326308290@qq.com
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
internal class ShardingQueryPrepareVisitor : ExpressionVisitor internal class ShardingQueryPrepareVisitor : ExpressionVisitor
@ -57,7 +57,7 @@ namespace ShardingCore.Sharding.Parsers.Visitors
shardingQueryableAsSequenceOptions, shardingQueryableAsSequenceOptions,
shardingEntities, isNoTracking, isIgnoreFilter); shardingEntities, isNoTracking, isIgnoreFilter);
} }
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
protected override Expression VisitConstant(ConstantExpression node) protected override Expression VisitConstant(ConstantExpression node)
{ {
if (node.Value is IQueryable queryable) if (node.Value is IQueryable queryable)
@ -68,7 +68,7 @@ namespace ShardingCore.Sharding.Parsers.Visitors
return base.VisitConstant(node); return base.VisitConstant(node);
} }
#endif #endif
#if EFCORE5 || EFCORE6 #if NET5_0 || NET6_0
protected override Expression VisitExtension(Expression node) protected override Expression VisitExtension(Expression node)
{ {
if (node is QueryRootExpression queryRootExpression) if (node is QueryRootExpression queryRootExpression)

View File

@ -377,7 +377,7 @@ namespace ShardingCore.Sharding.ShardingDbContextExecutors
throw; throw;
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()) public async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken())
{ {
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
@ -421,7 +421,7 @@ namespace ShardingCore.Sharding.ShardingDbContextExecutors
dataSourceDbContext.Value.Dispose(); dataSourceDbContext.Value.Dispose();
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {
foreach (var dataSourceDbContext in _dataSourceDbContexts) foreach (var dataSourceDbContext in _dataSourceDbContexts)

View File

@ -22,7 +22,7 @@ namespace ShardingCore.Sharding.ShardingDbContextExecutors
/// 同数据源下的dbcontext管理者 /// 同数据源下的dbcontext管理者
/// </summary> /// </summary>
public interface IDataSourceDbContext : IDisposable public interface IDataSourceDbContext : IDisposable
#if !EFCORE2 #if !NETCOREAPP2_0
, IAsyncDisposable , IAsyncDisposable
#endif #endif
{ {
@ -46,7 +46,7 @@ namespace ShardingCore.Sharding.ShardingDbContextExecutors
void Rollback(); void Rollback();
void Commit(int dataSourceCount); void Commit(int dataSourceCount);
#if !EFCORE2 #if !NETCOREAPP2_0
Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()); Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken());
Task CommitAsync(int dataSourceCount,CancellationToken cancellationToken = new CancellationToken()); Task CommitAsync(int dataSourceCount,CancellationToken cancellationToken = new CancellationToken());
#endif #endif

View File

@ -217,7 +217,7 @@ namespace ShardingCore.Sharding.ShardingDbContextExecutors
dbContextCache.Value.Dispose(); dbContextCache.Value.Dispose();
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken()) public async Task RollbackAsync(CancellationToken cancellationToken = new CancellationToken())
{ {

View File

@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.EntityFrameworkCore.Query; using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Query.Internal; using Microsoft.EntityFrameworkCore.Query.Internal;
#if EFCORE3 #if NETCOREAPP3_0
using Microsoft.EntityFrameworkCore.Query.Internal; using Microsoft.EntityFrameworkCore.Query.Internal;
#endif #endif
@ -20,7 +20,7 @@ namespace ShardingCore.Sharding
{ {
internal class ShardingEntityFrameworkQueryableExtensions internal class ShardingEntityFrameworkQueryableExtensions
{ {
#if !EFCORE2 #if !NETCOREAPP2_0
public static TResult ExecuteAsync<TSource, TResult>( public static TResult ExecuteAsync<TSource, TResult>(
MethodInfo operatorMethodInfo, MethodInfo operatorMethodInfo,
IQueryable<TSource> source, IQueryable<TSource> source,
@ -90,7 +90,7 @@ namespace ShardingCore.Sharding
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public static Task<TResult> ExecuteAsync<TSource, TResult>( public static Task<TResult> ExecuteAsync<TSource, TResult>(

View File

@ -49,7 +49,7 @@ namespace ShardingCore.Sharding.ShardingExecutors
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public TResult ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query, public TResult ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query,
CancellationToken cancellationToken = new CancellationToken()) CancellationToken cancellationToken = new CancellationToken())
@ -66,7 +66,7 @@ namespace ShardingCore.Sharding.ShardingExecutors
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query) public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(IShardingDbContext shardingDbContext, Expression query)
{ {
//预解析表达式 //预解析表达式

View File

@ -16,7 +16,7 @@ using ShardingCore.Extensions.InternalExtensions;
using ShardingCore.Sharding.MergeEngines; using ShardingCore.Sharding.MergeEngines;
using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines; using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines;
using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions.InMemoryMerge; using ShardingCore.Sharding.MergeEngines.ShardingMergeEngines.Abstractions.InMemoryMerge;
#if EFCORE2 #if NETCOREAPP2_0
using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Internal;
#endif #endif

View File

@ -110,7 +110,7 @@ namespace ShardingCore.Sharding.ShardingExecutors
.Invoke(_nativeTrackQueryExecutor, new object[] { queryCompilerContext, result }); .Invoke(_nativeTrackQueryExecutor, new object[] { queryCompilerContext, result });
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public TResult ExecuteAsync<TResult>(IQueryCompilerContext queryCompilerContext, public TResult ExecuteAsync<TResult>(IQueryCompilerContext queryCompilerContext,
CancellationToken cancellationToken = new CancellationToken()) CancellationToken cancellationToken = new CancellationToken())
{ {
@ -132,7 +132,7 @@ namespace ShardingCore.Sharding.ShardingExecutors
return ResultTrackExecute(result, queryCompilerContext, TrackAsyncEnumerable, TrackAsync); return ResultTrackExecute(result, queryCompilerContext, TrackAsyncEnumerable, TrackAsync);
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(IQueryCompilerContext queryCompilerContext) public IAsyncEnumerable<TResult> ExecuteAsync<TResult>(IQueryCompilerContext queryCompilerContext)
{ {

View File

@ -35,7 +35,7 @@ namespace ShardingCore.Sharding
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
public class StreamMergeContext : IMergeParseContext, IDisposable, IPrint public class StreamMergeContext : IMergeParseContext, IDisposable, IPrint
#if !EFCORE2 #if !NETCOREAPP2_0
, IAsyncDisposable , IAsyncDisposable
#endif #endif
{ {
@ -362,7 +362,7 @@ namespace ShardingCore.Sharding
dbContext.Dispose(); dbContext.Dispose();
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
{ {
@ -402,7 +402,7 @@ namespace ShardingCore.Sharding
ReSetOrders(propertyOrders); ReSetOrders(propertyOrders);
} }
} }
#if !EFCORE2 #if !NETCOREAPP2_0
public async ValueTask<bool> DbContextDisposeAsync(DbContext dbContext) public async ValueTask<bool> DbContextDisposeAsync(DbContext dbContext)
{ {
@ -416,7 +416,7 @@ namespace ShardingCore.Sharding
return false; return false;
} }
#endif #endif
#if EFCORE2 #if NETCOREAPP2_0
public Task<bool> DbContextDisposeAsync(DbContext dbContext) public Task<bool> DbContextDisposeAsync(DbContext dbContext)
{ {

View File

@ -153,7 +153,7 @@ namespace ShardingCore.Core.Internal.Visitors
} }
} }
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
internal class DbContextReplaceQueryableVisitor : DbContextInnerMemberReferenceReplaceQueryableVisitor internal class DbContextReplaceQueryableVisitor : DbContextInnerMemberReferenceReplaceQueryableVisitor
{ {
private readonly DbContext _dbContext; private readonly DbContext _dbContext;
@ -193,7 +193,7 @@ namespace ShardingCore.Core.Internal.Visitors
} }
#endif #endif
#if EFCORE5 || EFCORE6 #if NET5_0 || NET6_0
internal class DbContextReplaceQueryableVisitor : DbContextInnerMemberReferenceReplaceQueryableVisitor internal class DbContextReplaceQueryableVisitor : DbContextInnerMemberReferenceReplaceQueryableVisitor
{ {
private readonly DbContext _dbContext; private readonly DbContext _dbContext;

View File

@ -17,10 +17,10 @@ namespace ShardingCore.Core.Internal.Visitors.Querys
* @Date: Saturday, 20 February 2021 11:14:35 * @Date: Saturday, 20 February 2021 11:14:35
* @Email: 326308290@qq.com * @Email: 326308290@qq.com
*/ */
#if !EFCORE2 && !EFCORE3 && !EFCORE5 && !EFCORE6 #if !NETCOREAPP2_0 && !NETCOREAPP3_0 && !NET5_0 && !NET6_0
error error
#endif #endif
#if EFCORE2 || EFCORE3 #if NETCOREAPP2_0 || NETCOREAPP3_0
/// <summary> /// <summary>
/// 获取分表类型 /// 获取分表类型
/// </summary> /// </summary>
@ -117,7 +117,7 @@ namespace ShardingCore.Core.Internal.Visitors.Querys
} }
#endif #endif
#if EFCORE5 || EFCORE6 #if NET5_0 || NET6_0
/// <summary> /// <summary>
/// 获取分表类型 /// 获取分表类型
/// </summary> /// </summary>

View File

@ -1,21 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFrameworks>netcoreapp2;netcoreapp3;net5;net6</TargetFrameworks>
<Version>$(EFCORE6)</Version> <Version>$(NET6_0)</Version>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> <GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<DefineConstants>TRACE;DEBUG;EFCORE6;</DefineConstants> <DefineConstants>TRACE;DEBUG;</DefineConstants>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<RepositoryUrl>https://github.com/dotnetcore/sharding-core</RepositoryUrl> <RepositoryUrl>https://github.com/dotnetcore/sharding-core</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon> <PackageIcon>logo.png</PackageIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' and '$(TargetFramework)' == 'netcoreapp2'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\Release\ShardingCore.xml</DocumentationFile> <DocumentationFile>bin\Release\ShardingCore.2x.xml</DocumentationFile>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' and '$(TargetFramework)' == 'netcoreapp3'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\Release\ShardingCore.3x.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' and '$(TargetFramework)' == 'net5'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\Release\ShardingCore.5x.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' and '$(TargetFramework)' == 'net6'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\Release\ShardingCore.6x.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp2|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp2|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp3|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6|AnyCPU'">
<NoWarn>1701;1702;1591;</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Core\VirtualRoutes\RouteConditions\**" /> <Compile Remove="Core\VirtualRoutes\RouteConditions\**" />
<Compile Remove="Sharding\Abstractions\MergeParseContexts\**" /> <Compile Remove="Sharding\Abstractions\MergeParseContexts\**" />
@ -30,12 +71,22 @@
<PackagePath>\</PackagePath> <PackagePath>\</PackagePath>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2'">
<ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.8" /> </ItemGroup>
</ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.*" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Sharding\Visitors\GroupBys" /> <Folder Include="Sharding\Visitors\GroupBys" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
@ -16,8 +16,9 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src2x\ShardingCore.2x\ShardingCore.2x.csproj" /> <ItemGroup>
<ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -17,7 +17,7 @@
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src3x\ShardingCore.3x\ShardingCore.3x.csproj" /> <ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -20,6 +20,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src5x\ShardingCore.5x\ShardingCore.5x.csproj" /> <ProjectReference Include="..\..\src\ShardingCore\ShardingCore.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>