Skip to content

Commit

Permalink
Less special casing of dapper package
Browse files Browse the repository at this point in the history
Update some EF Core 6 dependencies

Shrink payload size take 1
(Remove Sqlite spatial support just added)
  • Loading branch information
ErikEJ committed Feb 26, 2023
1 parent 424594f commit 66b7ceb
Show file tree
Hide file tree
Showing 24 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/GUI/Directory.Build.Props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.51.0.59060">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.53.0.62665">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions src/GUI/RevEng.Core.60/RevEng.Core.60.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
<PackageReference Include="FirebirdSql.EntityFrameworkCore.Firebird" Version="9.1.1" />
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="6.0.12" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="6.0.7" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="6.0.14" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="6.0.8" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="6.0.8" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.90" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.NetTopologySuite" Version="6.0.2" />
<PackageReference Include="SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime" Version="6.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/RevEng.Core.70/RevEng.Core.70.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PackageReference Include="ErikEJ.EntityFrameworkCore.SqlServer.DateOnlyTimeOnly" Version="7.0.1" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="7.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="7.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="7.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion src/GUI/RevEng.Core/RevEng.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite" Version="3.1.8" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="3.1.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="3.1.4" />
Expand Down
6 changes: 0 additions & 6 deletions src/GUI/RevEng.Core/ServiceProviderBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public static ServiceProvider Build(ReverseEngineerCommandOptions options, List<
dateOnlyTimeOnly.ConfigureDesignTimeServices(serviceCollection);
}
#endif

break;

case DatabaseType.Npgsql:
Expand Down Expand Up @@ -256,11 +255,6 @@ public static ServiceProvider Build(ReverseEngineerCommandOptions options, List<
var sqliteProvider = new SqliteDesignTimeServices();
sqliteProvider.ConfigureDesignTimeServices(serviceCollection);

if (options.UseSpatial)
{
var spatial = new SqliteNetTopologySuiteDesignTimeServices();
spatial.ConfigureDesignTimeServices(serviceCollection);
}
#if CORE60
if (options.UseNodaTime)
{
Expand Down
15 changes: 15 additions & 0 deletions src/GUI/Shared/Extensions/ProjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,21 @@ private static List<NuGetPackage> GetNeededPackages(DatabaseType databaseType, R
});
}
}

if (options.Tables.Any(t => t.ObjectType == ObjectType.Procedure)
&& (options.CodeGenerationMode == CodeGenerationMode.EFCore6
|| options.CodeGenerationMode == CodeGenerationMode.EFCore7)
&& AdvancedOptions.Instance.DiscoverMultipleResultSets)
{
packages.Add(new NuGetPackage
{
PackageId = "Dapper",
Version = "2.0.123",
DatabaseTypes = new List<DatabaseType> { DatabaseType.SQLServer, DatabaseType.SQLServerDacpac },
IsMainProviderPackage = false,
UseMethodName = null,
});
}
}

if (databaseType == DatabaseType.SQLite)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,6 @@ private static async Task InstallNuGetPackagesAsync(Project project, bool onlyGe
nuGetHelper.InstallPackage(nuGetPackage.PackageId, project, new Version(nuGetPackage.Version));
}
}

if (options.Tables.Any(t => t.ObjectType == ObjectType.Procedure)
&& AdvancedOptions.Instance.DiscoverMultipleResultSets)
{
nuGetHelper.InstallPackage("Dapper", project);
}
}

private async Task<bool> ChooseDataBaseConnectionByUiHintAsync(ReverseEngineerOptions options)
Expand Down
3 changes: 2 additions & 1 deletion src/GUI/Shared/Helpers/ReverseEngineerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ public string GetReadMeText(ReverseEngineerOptions options, string content)

public string GetReadMeText(ReverseEngineerOptions options, string content, List<NuGetPackage> packages)
{
var extraPackages = packages.Where(p => !p.IsMainProviderPackage).Select(p => $"Use{p.UseMethodName}()").ToList();
var extraPackages = packages.Where(p => !p.IsMainProviderPackage && p.UseMethodName != null)
.Select(p => $"Use{p.UseMethodName}()").ToList();

var useText = string.Empty;

Expand Down
Binary file added src/GUI/lib/DacFX161.zip
Binary file not shown.
Binary file added src/GUI/lib/DacFX161/DacFxStrongTypedCore.161.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/GUI/lib/DacFX161/Microsoft.SqlServer.Dac.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/GUI/lib/Microsoft.ApplicationInsights.dll
Binary file not shown.
Binary file modified src/GUI/lib/efreveng.exe.zip
Binary file not shown.
Binary file modified src/GUI/lib/efreveng60.exe.zip
Binary file not shown.
Binary file modified src/GUI/lib/efreveng60arm.exe.zip
Binary file not shown.
Binary file modified src/GUI/lib/efreveng70.exe.zip
Binary file not shown.
Binary file modified src/GUI/lib/efreveng70arm.exe.zip
Binary file not shown.

0 comments on commit 66b7ceb

Please sign in to comment.