Skip to content

Commit

Permalink
Updated solution to .net8.0 and Microsoft.Data.SqlClient.
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-ordonez-mdevs committed Mar 14, 2024
1 parent 07a6885 commit a96312d
Show file tree
Hide file tree
Showing 17 changed files with 59 additions and 52 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ $ docker-compose down

## Change log

Version `5.0.0`:
- Changed .NET Standard libraries to .NET 8.0.
- Updated dependencies to latest versions.
- Migrated SQL Server connector to use `Microsoft.Data.SqlClient` vs `System.Data.SqlClient`. This will bring a lot of new security options to connect to Azure Entra ID, and a lot of security fixes and validations.
> **IMPORTANT**: This is a breaking change. If you were using the SqlServer connector, your connection strings will probably require some updates, to use either one of several options provided within Azure, or to use proper certificates and encryption.
Version `4.0.1`:

- Updated dependencies to latest versions.
Expand Down
35 changes: 22 additions & 13 deletions build/publish.runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,36 @@ index=$4
noclsArg=$5
deployDir=../.deploy/$tool
distDir=../dist
ubuntu16=ubuntu.16.04-x64
zipFile="$tool.$runtime.tar.gz"

if [[ "$tool" == "" ]]; then error "Missing tool name." ; buildFailed ; fi
if [[ "$toolProject" == "" ]]; then error "Missing tool path." ; buildFailed ; fi
if [[ "$runtime" == "" ]]; then error "Missing runtime version." ; buildFailed ; fi
if [[ "$index" == "" ]]; then index="1";fi
if [[ "$noclsArg" == "" ]]; then clear;fi
if [[ "$runtime" == "" ]]; then buildFailed;fi
if [ ! -d "$distDir" ]; then mkdir $distDir;fi
framework=net8.0

if [[ "$tool" == "" ]]; then
error "Missing tool name."
buildFailed
fi
if [[ "$toolProject" == "" ]]; then
error "Missing tool path."
buildFailed
fi
if [[ "$runtime" == "" ]]; then
error "Missing runtime version."
buildFailed
fi
if [[ "$index" == "" ]]; then index="1"; fi
if [[ "$noclsArg" == "" ]]; then clear; fi
if [[ "$runtime" == "" ]]; then buildFailed; fi
if [ ! -d "$distDir" ]; then mkdir $distDir; fi

block "$index - PUBLISH AND ZIP $tool FOR $C_CYAN $runtime $C_TRANSPARENT"

execute "rm -rf $deployDir/$runtime/"

execute "dotnet publish $toolProject -c Release -f net7.0 -r $runtime --self-contained -o $deployDir/$runtime/ -v q"
execute "dotnet publish $toolProject -c Release -f $framework -r $runtime --self-contained -o $deployDir/$runtime/ -v q"

execute "rm -rf $distDir/$zipFile"

pushd $deployDir/$runtime/
pushd "$deployDir/$runtime/" || exit
execute "tar -zcvf ../../$distDir/$zipFile ./" "gzip $distDir/$zipFile"
popd
popd || exit

buildSuccessfully
buildSuccessfully
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>4.0.1</Version>
<TargetFramework>net8.0</TargetFramework>
<Version>5.0.0</Version>
<Authors>Miracle Devs</Authors>
<Company>Miracle Devs</Company>
<Product>Paradigm.ORM</Product>
Expand All @@ -20,7 +20,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CassandraCSharpDriver" Version="3.19.5" />
<PackageReference Include="CassandraCSharpDriver" Version="3.20.1" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
Expand Down
6 changes: 3 additions & 3 deletions src/Paradigm.ORM.Data.MySql/Paradigm.ORM.Data.MySql.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageProjectUrl>http://www.paradigm.net.co/</PackageProjectUrl>
<Copyright>Miracle Devs</Copyright>
Expand All @@ -12,15 +12,15 @@
<RepositoryType>git</RepositoryType>
<Authors>Miracle Devs</Authors>
<Company>Miracle Devs</Company>
<Version>4.0.1</Version>
<Version>5.0.0</Version>
<Product>Paradigm.ORM</Product>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>Paradigm;ORM;MySql;Database</PackageTags>
<Title>Paradigm ORM MySql Connector</Title>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MySqlConnector" Version="2.3.1" />
<PackageReference Include="MySqlConnector" Version="2.3.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>Paradigm ORM Posgre Connector library.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -11,7 +11,7 @@
<Company>Miracle Devs</Company>
<Copyright>Miracle Devs</Copyright>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.0.1</Version>
<Version>5.0.0</Version>
<Product>Paradigm.ORM</Product>
<Title>Paradigm ORM PostgreSql Connector</Title>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageProjectUrl>http://www.paradigm.net.co/</PackageProjectUrl>
<Copyright>Miracle Devs</Copyright>
Expand All @@ -12,15 +12,15 @@
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/MiracleDevs/Paradigm.ORM.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>4.0.1</Version>
<Version>5.0.0</Version>
<Product>Paradigm.ORM</Product>
<Title>Paradigm ORM SqlServer Connector</Title>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>Paradigm;ORM;SqlServer;TSQL;Database</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.Data.SqlServer/SqlDatabaseCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;
using Paradigm.ORM.Data.Converters;
using Paradigm.ORM.Data.Database;
Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.Data.SqlServer/SqlDatabaseConnector.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;
using Paradigm.ORM.Data.CommandBuilders;
using Paradigm.ORM.Data.Converters;
Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.Data.SqlServer/SqlDatabaseReader.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.IO;
using Paradigm.ORM.Data.Database;

Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.Data.SqlServer/SqlDatabaseTransaction.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using Paradigm.ORM.Data.Database;

namespace Paradigm.ORM.Data.SqlServer
Expand Down
6 changes: 3 additions & 3 deletions src/Paradigm.ORM.Data/Paradigm.ORM.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Copyright>Miracle Devs</Copyright>
<PackageProjectUrl>http://www.paradigm.net.co/</PackageProjectUrl>
<Description>Paradigm ORM data library.
<Description>Paradigm ORM data library.
This library contains the core agnostic elements, and it's implemented in every specific connector package.</Description>
<PostBuildEvent></PostBuildEvent>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
Expand All @@ -15,7 +15,7 @@ This library contains the core agnostic elements, and it's implemented in every
<RepositoryType>git</RepositoryType>
<Authors>Miracle Devs</Authors>
<Company>Miracle Devs</Company>
<Version>4.0.1</Version>
<Version>5.0.0</Version>
<Product>Paradigm.ORM</Product>
<Title>Paradigm ORM Data</Title>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.DataExport/Paradigm.ORM.DataExport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ApplicationIcon>dataexport.ico</ApplicationIcon>
<StartupObject>Paradigm.ORM.DataExport.Program</StartupObject>
<AssemblyName>dataexport</AssemblyName>
Expand Down
8 changes: 2 additions & 6 deletions src/Paradigm.ORM.DbFirst/Paradigm.ORM.DbFirst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>dbfirst.ico</ApplicationIcon>
<OutputTypeEx>exe</OutputTypeEx>
<StartupObject>Paradigm.ORM.DbFirst.Program</StartupObject>
</PropertyGroup>

<PropertyGroup>
<RuntimeIdentifiers>win10-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
<AssemblyName>dbfirst</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
Expand Down
6 changes: 1 addition & 5 deletions src/Paradigm.ORM.DbPublisher/Paradigm.ORM.DbPublisher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>dbpublisher.ico</ApplicationIcon>
<OutputTypeEx>exe</OutputTypeEx>
<StartupObject>Paradigm.ORM.DbPublisher.Program</StartupObject>
</PropertyGroup>

<PropertyGroup>
<RuntimeIdentifiers>win10-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
<AssemblyName>dbpublisher</AssemblyName>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Paradigm.ORM.Tests/Fixtures/ConnectionStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class ConnectionStrings

public const string PSql = "Server=127.0.0.1;User Id=postgres;Password=Paradigm_Test_1234;Timeout=3;Database=test";

public const string MsSql = "Server=127.0.0.1;User=sa;Password=Paradigm_Test_1234;Connection Timeout=3600";
public const string MsSql = "Server=127.0.0.1;User=sa;Password=Paradigm_Test_1234;Connection Timeout=3600;Encrypt=false";
}
}
8 changes: 4 additions & 4 deletions src/Paradigm.ORM.Tests/Paradigm.ORM.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,9 +18,9 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Paradigm.Core.Mapping" Version="3.0.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/Paradigm.ORM.Vb.Tests/Paradigm.ORM.Vb.Tests.vbproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit a96312d

Please sign in to comment.