Skip to content

Commit eef7e72

Browse files
authored
Merge pull request #516 from paillave/dotnet9-migration
Dotnet9 migration
2 parents ed9b8a7 + 5ee451c commit eef7e72

File tree

69 files changed

+1750
-1445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1750
-1445
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup .NET Core
1515
uses: actions/setup-dotnet@v1
1616
with:
17-
dotnet-version: '7.x'
17+
dotnet-version: '9.x'
1818
- name: Install dependencies
1919
working-directory: src
2020
run: dotnet restore

.github/workflows/Release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup .NET Core
1414
uses: actions/setup-dotnet@v1
1515
with:
16-
dotnet-version: '7.x'
16+
dotnet-version: '9.x'
1717
- name: Install dependencies
1818
working-directory: src
1919
run: dotnet restore

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{
2-
"files.exclude": {
3-
"src": true, // this is a default value
4-
"documentation": true, // this is a default value
5-
"docs": true, // this is a default value
6-
},
1+
{
2+
"files.exclude": {
3+
"src": false,
4+
"documentation": true, // this is a default value
5+
"docs": true, // this is a default value
6+
},
77
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ using Paillave.Etl.FileSystem;
6666
using Paillave.Etl.Zip;
6767
using Paillave.Etl.TextFile;
6868
using Paillave.Etl.SqlServer;
69-
using System.Data.SqlClient;
69+
using Microsoft.Data.SqlClient;
7070
using System.Linq;
7171

7272
namespace SimpleTutorial
@@ -141,7 +141,7 @@ using Paillave.Etl.FileSystem;
141141
using Paillave.Etl.Zip;
142142
using Paillave.Etl.TextFile;
143143
using Paillave.Etl.SqlServer;
144-
using System.Data.SqlClient;
144+
using Microsoft.Data.SqlClient;
145145

146146
namespace SimpleTutorial
147147
{

documentation/docs/tutorials/2-defineProcess.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ contextStream
6868

6969
## Setup the connection
7070

71-
By using `System.Data.SqlClient`, we create a connection to the database and we will inject it into the ETL process when triggering it.
71+
By using `Microsoft.Data.SqlClient`, we create a connection to the database and we will inject it into the ETL process when triggering it.
7272

7373
The extension that needs to operate with the database will get its connection through the DI setup here.
7474

@@ -200,7 +200,7 @@ using Paillave.Etl.FileSystem;
200200
using Paillave.Etl.Zip;
201201
using Paillave.Etl.TextFile;
202202
using Paillave.Etl.SqlServer;
203-
using System.Data.SqlClient;
203+
using Microsoft.Data.SqlClient;
204204
using Paillave.Etl.Core;
205205

206206
namespace SimpleTutorial

documentation/docs/tutorials/3-trackAndCheck.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ using Paillave.Etl.FileSystem;
329329
using Paillave.Etl.Zip;
330330
using Paillave.Etl.TextFile;
331331
using Paillave.Etl.SqlServer;
332-
using System.Data.SqlClient;
332+
using Microsoft.Data.SqlClient;
333333

334334
namespace SimpleTutorial
335335
{

documentation/src/components/HomepageExamples.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ using Paillave.Etl.FileSystem;
5555
using Paillave.Etl.Zip;
5656
using Paillave.Etl.TextFile;
5757
using Paillave.Etl.SqlServer;
58-
using System.Data.SqlClient;
58+
using Microsoft.Data.SqlClient;
5959
6060
namespace SimpleTutorial
6161
{

documentation/src/components/QuickStart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ using Paillave.Etl.FileSystem;
3131
using Paillave.Etl.Zip;
3232
using Paillave.Etl.TextFile;
3333
using Paillave.Etl.SqlServer;
34-
using System.Data.SqlClient;
34+
using Microsoft.Data.SqlClient;
3535
using System.Linq;
3636
3737
namespace SimpleTutorial

src/.vscode/launch.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/Paillave.Etl.Scheduler/bin/Debug/net7.0/Paillave.Etl.Scheduler.dll",
12+
"program": "${workspaceFolder}/Paillave.Etl.Scheduler/bin/Debug/net9.0/Paillave.Etl.Scheduler.dll",
1313
"args": [ ],
1414
"cwd": "${workspaceFolder}/Paillave.Etl.Scheduler",
1515
"stopAtEntry": false,
@@ -20,7 +20,7 @@
2020
"type": "coreclr",
2121
"request": "launch",
2222
"preLaunchTask": "build",
23-
"program": "${workspaceFolder}/Tutorials/Paillave.Etl.Samples/bin/Debug/net7.0/Paillave.Etl.Samples.dll",
23+
"program": "${workspaceFolder}/Tutorials/Paillave.Etl.Samples/bin/Debug/net9.0/Paillave.Etl.Samples.dll",
2424
"args": [
2525
"/home/stephane/Desktop/"
2626
],
@@ -33,7 +33,7 @@
3333
"type": "coreclr",
3434
"request": "launch",
3535
"preLaunchTask": "build",
36-
"program": "${workspaceFolder}/Tutorials/SimpleTutorial/bin/Debug/net7.0/SimpleTutorial.dll",
36+
"program": "${workspaceFolder}/Tutorials/SimpleTutorial/bin/Debug/net9.0/SimpleTutorial.dll",
3737
"args": [
3838
"data",
3939
"Server=localhost,1433;Database=SimpleTutorial;user=SimpleTutorial;password=TestEtl.TestEtl;MultipleActiveResultSets=True"
@@ -47,7 +47,7 @@
4747
"type": "coreclr",
4848
"request": "launch",
4949
"preLaunchTask": "build",
50-
"program": "${workspaceFolder}/Tutorials/BlogTutorial/bin/Debug/net7.0/BlogTutorial.dll",
50+
"program": "${workspaceFolder}/Tutorials/BlogTutorial/bin/Debug/net9.0/BlogTutorial.dll",
5151
"args": [
5252
"data",
5353
"Server=localhost,1433;Database=BlogTutorial;user=BlogTutorial;password=TestEtl.TestEtl;MultipleActiveResultSets=True"
@@ -61,7 +61,7 @@
6161
"type": "coreclr",
6262
"request": "launch",
6363
"preLaunchTask": "build",
64-
"program": "${workspaceFolder}/Tutorials/Paillave.Etl.Samples/bin/Debug/net7.0/Paillave.Etl.Samples.dll",
64+
"program": "${workspaceFolder}/Tutorials/Paillave.Etl.Samples/bin/Debug/net9.0/Paillave.Etl.Samples.dll",
6565
"args": [
6666
"data",
6767
"Server=localhost,1433;Database=BlogTutorial;user=BlogTutorial;password=TestEtl.TestEtl;MultipleActiveResultSets=True"
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq.Expressions;
4-
using System.Text;
54
using System.Threading;
65
using Microsoft.EntityFrameworkCore;
76
using Microsoft.EntityFrameworkCore.Metadata;
8-
// using Paillave.EntityFrameworkCoreExtension.BulkSave.Postgres;
97
using Paillave.EntityFrameworkCoreExtension.BulkSave.SqlServer;
108

11-
namespace Paillave.EntityFrameworkCoreExtension.BulkSave
9+
namespace Paillave.EntityFrameworkCoreExtension.BulkSave;
10+
11+
public class BulkSaveEngine<T> : BulkSaveEngineBase<T> where T : class
1212
{
13-
public class BulkSaveEngine<T> : BulkSaveEngineBase<T> where T : class
13+
public BulkSaveEngine(DbContext context, params Expression<Func<T, object>>[] pivotKeys) : base(context, pivotKeys)
1414
{
15-
public BulkSaveEngine(DbContext context, params Expression<Func<T, object>>[] pivotKeys) : base(context, pivotKeys)
16-
{
17-
}
15+
}
1816

19-
protected override SaveContextQueryBase<T> CreateSaveContextQueryInstance(DbContext context, string schema, string table, List<IProperty> propertiesToInsert, List<IProperty> propertiesToUpdate, List<List<IProperty>> propertiesForPivotSet, List<IProperty> propertiesToBulkLoad, List<IEntityType> entityTypes, CancellationToken cancellationToken)
20-
{
21-
if (context.Database.IsSqlServer())
22-
return new SqlServerSaveContextQuery<T>(context, schema, table, propertiesToInsert, propertiesToUpdate, propertiesForPivotSet, propertiesToBulkLoad, entityTypes, cancellationToken, base.StoreObject);
23-
// if (context.Database.IsNpgsql())
24-
// return new PostgresSaveContextQuery<T>(context, schema, table, propertiesToInsert, propertiesToUpdate, propertiesForPivotSet, propertiesToBulkLoad, entityTypes);
25-
throw new Exception("unsupported provider");
26-
}
17+
protected override SaveContextQueryBase<T> CreateSaveContextQueryInstance(DbContext context, string schema, string table, List<IProperty> propertiesToInsert, List<IProperty> propertiesToUpdate, List<List<IProperty>> propertiesForPivotSet, List<IProperty> propertiesToBulkLoad, List<IEntityType> entityTypes, CancellationToken cancellationToken)
18+
{
19+
if (context.Database.IsSqlServer())
20+
return new SqlServerSaveContextQuery<T>(context, schema, table, propertiesToInsert, propertiesToUpdate, propertiesForPivotSet, propertiesToBulkLoad, entityTypes, cancellationToken, base.StoreObject);
21+
// if (context.Database.IsNpgsql())
22+
// return new PostgresSaveContextQuery<T>(context, schema, table, propertiesToInsert, propertiesToUpdate, propertiesForPivotSet, propertiesToBulkLoad, entityTypes);
23+
throw new Exception("unsupported provider");
2724
}
2825
}

0 commit comments

Comments
 (0)