diff --git a/NPoco.sln b/NPoco.sln
index 13e39bd5..334dee97 100644
--- a/NPoco.sln
+++ b/NPoco.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30509.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C7A94BA4-5689-4651-872D-7D7711D2DEDF}"
EndProject
@@ -18,6 +18,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPoco.Tests", "test\NPoco.T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPoco.JsonNet", "src\NPoco.JsonNet\NPoco.JsonNet.csproj", "{8DCCBC0A-36D4-4F3C-9B16-39B23AAFD726}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPoco.SqlServer", "src\NPoco.SqlServer\NPoco.SqlServer.csproj", "{15554441-8CF4-4B7B-A6D3-914463BFFF42}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -36,6 +38,10 @@ Global
{8DCCBC0A-36D4-4F3C-9B16-39B23AAFD726}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DCCBC0A-36D4-4F3C-9B16-39B23AAFD726}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DCCBC0A-36D4-4F3C-9B16-39B23AAFD726}.Release|Any CPU.Build.0 = Release|Any CPU
+ {15554441-8CF4-4B7B-A6D3-914463BFFF42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {15554441-8CF4-4B7B-A6D3-914463BFFF42}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {15554441-8CF4-4B7B-A6D3-914463BFFF42}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {15554441-8CF4-4B7B-A6D3-914463BFFF42}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -44,5 +50,9 @@ Global
{56481BBA-35A1-4061-9FE8-0ED9E1B6A0A3} = {C7A94BA4-5689-4651-872D-7D7711D2DEDF}
{B39C2641-0655-47CC-A1A3-5E1F84714FB5} = {8EDBB46A-95F8-442E-A432-19A50ED0683B}
{8DCCBC0A-36D4-4F3C-9B16-39B23AAFD726} = {C7A94BA4-5689-4651-872D-7D7711D2DEDF}
+ {15554441-8CF4-4B7B-A6D3-914463BFFF42} = {C7A94BA4-5689-4651-872D-7D7711D2DEDF}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {75EBE34D-2D61-4748-A383-DB920088B393}
EndGlobalSection
EndGlobal
diff --git a/build.ps1 b/build.ps1
index b04fe9dd..9db47e6e 100644
--- a/build.ps1
+++ b/build.ps1
@@ -9,6 +9,7 @@ Properties {
$build_artifacts_dir = "$build_dir\build"
$solution_dir = "$build_dir\src\NPoco"
$jsonnet = "$build_dir\src\NPoco.JsonNet"
+ $sqlserver = "$build_dir\src\NPoco.SqlServer"
}
FormatTaskName (("-"*25) + "[{0}]" + ("-"*25))
@@ -19,10 +20,14 @@ Task Build -depends Clean {
Write-Host "Creating BuildArtifacts" -ForegroundColor Green
Exec { dotnet restore }
Set-Location "$solution_dir"
- #$env:DNX_BUILD_VERSION="alpha02"
- Exec { dotnet pack --configuration release --output $build_artifacts_dir }
+ if ($env:BUILD_SUFFIX -ne "") {
+ $suffix = "/p:VersionSuffix=""$env:BUILD_SUFFIX"""
+ }
+ Exec { dotnet pack --configuration release --output $build_artifacts_dir $suffix }
Set-Location "$jsonnet"
- Exec { dotnet pack --configuration release --output $build_artifacts_dir }
+ Exec { dotnet pack --configuration release --output $build_artifacts_dir $suffix }
+ Set-Location "$sqlserver"
+ Exec { dotnet pack --configuration release --output $build_artifacts_dir $suffix }
}
Task Clean {
diff --git a/src/NPoco.JsonNet/NPoco.JsonNet.csproj b/src/NPoco.JsonNet/NPoco.JsonNet.csproj
index 955ca7ef..429714ea 100644
--- a/src/NPoco.JsonNet/NPoco.JsonNet.csproj
+++ b/src/NPoco.JsonNet/NPoco.JsonNet.csproj
@@ -2,20 +2,19 @@
Provides an implementation to use Json.NET as the serializer for serialized columns
- 4.0.0
- net35;net45;net40;netstandard1.3;netstandard2.0
+ 5.0.0
+ net461;netstandard2.0;netstandard2.1
NPoco.JsonNet
NPoco.JsonNet
orm;sql;micro-orm;database;mvc
https://github.com/schotime/NPoco
- http://www.apache.org/licenses/LICENSE-2.0
- $(PackageTargetFallback);dnxcore50
false
false
false
false
false
false
+ 8.0
@@ -23,36 +22,7 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client
-
-
diff --git a/src/NPoco/DatabaseTypes/SqlServer2008DatabaseType.cs b/src/NPoco.SqlServer/DatabaseTypes/SqlServer2008DatabaseType.cs
similarity index 100%
rename from src/NPoco/DatabaseTypes/SqlServer2008DatabaseType.cs
rename to src/NPoco.SqlServer/DatabaseTypes/SqlServer2008DatabaseType.cs
diff --git a/src/NPoco/DatabaseTypes/SqlServer2012DatabaseType.cs b/src/NPoco.SqlServer/DatabaseTypes/SqlServer2012DatabaseType.cs
similarity index 82%
rename from src/NPoco/DatabaseTypes/SqlServer2012DatabaseType.cs
rename to src/NPoco.SqlServer/DatabaseTypes/SqlServer2012DatabaseType.cs
index 47c441c4..3839127b 100644
--- a/src/NPoco/DatabaseTypes/SqlServer2012DatabaseType.cs
+++ b/src/NPoco.SqlServer/DatabaseTypes/SqlServer2012DatabaseType.cs
@@ -1,5 +1,5 @@
using System;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
using System.Linq;
namespace NPoco.DatabaseTypes
@@ -21,10 +21,10 @@ public override string BuildPageQuery(long skip, long take, PagingHelper.SQLPart
return sqlPage;
}
- public override string GetAutoIncrementExpression(TableInfo ti)
+ public override string? GetAutoIncrementExpression(TableInfo ti)
{
if (!string.IsNullOrEmpty(ti.SequenceName))
- return string.Format("NEXT VALUE FOR {0}", ti.SequenceName);
+ return $"NEXT VALUE FOR {ti.SequenceName}";
return null;
}
diff --git a/src/NPoco/DatabaseTypes/SqlServerCEDatabaseType.cs b/src/NPoco.SqlServer/DatabaseTypes/SqlServerCEDatabaseType.cs
similarity index 76%
rename from src/NPoco/DatabaseTypes/SqlServerCEDatabaseType.cs
rename to src/NPoco.SqlServer/DatabaseTypes/SqlServerCEDatabaseType.cs
index 822824a4..071ae8fe 100644
--- a/src/NPoco/DatabaseTypes/SqlServerCEDatabaseType.cs
+++ b/src/NPoco.SqlServer/DatabaseTypes/SqlServerCEDatabaseType.cs
@@ -1,6 +1,7 @@
using System.Data;
using System.Data.Common;
using System.Linq;
+using System.Threading.Tasks;
namespace NPoco.DatabaseTypes
{
@@ -19,14 +20,11 @@ public override object ExecuteInsert(Database db, DbCommand cmd, string prima
return db.ExecuteScalar