Compare commits

...

70 Commits

Author SHA1 Message Date
Kentin BRONGNIART 1338a073fd correction PaginationResult
continuous-integration/drone/push Build is passing Details
2 weeks ago
Kentin BRONGNIART 3510f8219d Merge branch 'master' of https://codefirst.iut.uca.fr/git/WhatTheFantasy/WF-PmAPI
continuous-integration/drone/push Build is passing Details
2 weeks ago
Kentin BRONGNIART fceef665af correction probleme route quote
2 weeks ago
Leni BEAULATON 887b43a8a9 Mise à jour de 'README.md'
continuous-integration/drone/push Build is passing Details
2 weeks ago
Kentin BRONGNIART b28632ca27 Route update Lang + correction update lang
continuous-integration/drone/push Build is passing Details
2 weeks ago
Kentin BRONGNIART 092b53fe89 Mise a jour User Lang
continuous-integration/drone/push Build is passing Details
2 weeks ago
Leni BEAULATON eb950fe801 Merge branch 'master' of https://codefirst.iut.uca.fr/git/WhatTheFantasy/WF-PmAPI
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON d51225cf23 Bdd21 PGSQL
3 weeks ago
Leni BEAULATON 326141ebea Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 5153564054 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build encountered an error Details
3 weeks ago
Leni BEAULATON 1f6dfeefc4 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 7660456667 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 738880a055 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 42b791d630 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON b695a0c3a9 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 8f60990194 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 6d8db552c7 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 5634943a6d Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 552e18702c Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 0c62d8ed3b Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 571f2f0967 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON f96b0650bd Bdd2 PGSQL
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON dd5461e3e4 Bdd1 PGSQL
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON f1e5399674 Bdd12 SQLite
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON ff0129aba2 Bdd11 SQLite
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON d6b7d5cc10 Bdd10 SQLite
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 0f02cc0563 Merge branch 'master' of https://codefirst.iut.uca.fr/git/WhatTheFantasy/WF-PmAPI
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON e9db38a673 Bdd9 SQLite
3 weeks ago
Leni BEAULATON 344c2b8a61 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON da6534249f Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON ba1429e8d0 Merge branch 'master' of https://codefirst.iut.uca.fr/git/WhatTheFantasy/WF-PmAPI
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON f125ebc9fd Bdd8 SQLite
3 weeks ago
Leni BEAULATON 8e24f3bd4d Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 11e9f528b0 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 197251908c Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 8383532f79 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON ddc7bd482a Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON d0765e9194 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON dac0c7a433 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON ed87c0a42b Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 26e2aaa75c Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Leni BEAULATON 1bffdcd1ca Mise à jour de '.drone.yml'
continuous-integration/drone/push Build was killed Details
3 weeks ago
Leni BEAULATON 3c94e8900d Mise à jour de '.drone.yml'
continuous-integration/drone/push Build encountered an error Details
3 weeks ago
Leni BEAULATON feda8ddd81 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build encountered an error Details
3 weeks ago
Leni BEAULATON d1f802a002 Bdd7 SQLite
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON f578dffd53 Bdd6 SQLite
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON c6bb4053f6 Bdd5 SQLite
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 5f35563be6 Bdd5
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON a1eddae208 Merge branch 'master' of https://codefirst.iut.uca.fr/git/WhatTheFantasy/WF-PmAPI
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON e369fb398b bdd4
3 weeks ago
Leni BEAULATON d452ae3047 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON c5d0339496 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 725bfe0587 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON e3654aa81c Bdd2
continuous-integration/drone/push Build is passing Details
3 weeks ago
Leni BEAULATON 6066064815 Connexion bdd
continuous-integration/drone/push Build is passing Details
3 weeks ago
Kentin BRONGNIART 865ad2448d Mise à jour de 'WF_EF_Api/StubbedContextLib/StubWTFContext.cs'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Kentin BRONGNIART c93119742b Mise à jour de '.drone.yml'
continuous-integration/drone/push Build was killed Details
3 weeks ago
Kentin BRONGNIART a474728dae Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
3 weeks ago
Kentin BRONGNIART 3ff914a543 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 6f6d154542 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 0169d251a4 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 017e298fe5 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART e1de173450 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART e20adb2c8f Mise à jour de 'WF_EF_Api/WfApi/Dockerfile'
continuous-integration/drone/push Build was killed Details
3 weeks ago
Kentin BRONGNIART e9f08492b8 Mise à jour de 'WF_EF_Api/WfApi/Dockerfile'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 24be82306c Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 7b37013f73 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART d2fd7db0ab Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kentin BRONGNIART 1b39853556 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
3 weeks ago
Kevin MONDEJAR 8674879e75 Merge pull request 'Merge_API_EF' (#8) from Merge_API_EF into master
continuous-integration/drone/push Build is failing Details
3 weeks ago

@ -2,6 +2,7 @@ kind: pipeline
type: docker type: docker
name: CI_ApiPm name: CI_ApiPm
trigger: trigger:
event: event:
- push - push
@ -92,7 +93,7 @@ steps:
- dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - dotnet test WF_EF_Api/XUnitTest/XUnitTest.csproj --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport" - reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
- dotnet sonarscanner end /d:sonar.login=$${sonar_token_wtf} - dotnet sonarscanner end /d:sonar.login=$${sonar_token_wtf}
depends_on: [test] depends_on: [test,generate doc]
- name: publish - name: publish
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
@ -113,7 +114,7 @@ steps:
from_secret: POSTGRES_USER_API from_secret: POSTGRES_USER_API
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB:
from_secret: POSTGRES_DB_API from_secret: POSTGRES_DB_API
ADMINS: kentinbrongniart,lenibeaulaton ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2
- name: deploy-auth-db - name: deploy-auth-db
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
@ -128,7 +129,7 @@ steps:
from_secret: POSTGRES_USER_AUTH from_secret: POSTGRES_USER_AUTH
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB:
from_secret: POSTGRES_DB_AUTH from_secret: POSTGRES_DB_AUTH
ADMINS: kentinbrongniart,lenibeaulaton ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2
- name: deploy-test-db - name: deploy-test-db
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
@ -140,15 +141,31 @@ steps:
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD: "test"
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: "test"
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test" CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: "wtf-test"
ADMINS: kentinbrongniart,lenibeaulaton ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2
- name: update-database
image: mcr.microsoft.com/dotnet/sdk:8.0
#DB_PATH_AUTH: "WhatTheFantasy-wtf-api-auth"
environment:
HOST: "WhatTheFantasy-wtf-api-test"
PASSWORD: "test"
USER: "test"
DB: "wtf-test"
commands:
- cd WF_EF_Api/StubbedContextLib
- dotnet tool install --global dotnet-ef
- export PATH="$PATH:/root/.dotnet/tools"
- dotnet ef database update --connection "Host=$${HOST};Database=$${DB};Username=$${USER};Password=$${PASSWORD};"
depends_on: [deploy-api-db,deploy-auth-db,deploy-test-db]
- name: publish-to-registry - name: publish-to-registry
image: plugins/docker image: plugins/docker
settings: settings:
dockerfile: src/Dockerfile dockerfile: WF_EF_Api/WfApi/Dockerfile
context: src/ context: WF_EF_Api/
registry: hub.codefirst.iut.uca.fr registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/WhatTheFantasy/WF-PmAPI repo: hub.codefirst.iut.uca.fr/whatthefantasy/wf-pmapi
username: username:
from_secret: SECRET_REGISTRY_USERNAME from_secret: SECRET_REGISTRY_USERNAME
password: password:
@ -158,27 +175,34 @@ steps:
- name: deploy-container - name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment: environment:
IMAGENAME: hub.codefirst.iut.uca.fr/WhatTheFantasy/WF-PmAPI:latest IMAGENAME: hub.codefirst.iut.uca.fr/whatthefantasy/wf-pmapi:latest
CONTAINERNAME: web-services CONTAINERNAME: web-services
COMMAND: create COMMAND: create
OVERWRITE: true OVERWRITE: true
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API: "SAE-WHAT-THE-FANTASY-wtf-api" CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API: "WhatTheFantasy-wtf-api"
CODEFIRST_CLIENTDRONE_ENV_DB_USER_API: CODEFIRST_CLIENTDRONE_ENV_DB_USER_API:
from_secret: POSTGRES_USER_API from_secret: POSTGRES_USER_API
CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API: CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API:
from_secret: POSTGRES_PASSWORD_API from_secret: POSTGRES_PASSWORD_API
CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API: CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API:
from_secret: POSTGRES_DB_API from_secret: POSTGRES_DB_API
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_AUTH: "SAE-WHAT-THE-FANTASY-wtf-api-auth"
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_AUTH: "WhatTheFantasy-wtf-api-auth"
CODEFIRST_CLIENTDRONE_ENV_DB_USER_AUTH: CODEFIRST_CLIENTDRONE_ENV_DB_USER_AUTH:
from_secret: POSTGRES_USER_AUTH from_secret: POSTGRES_USER_AUTH
CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_AUTH: CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_AUTH:
from_secret: POSTGRES_PASSWORD_AUTH from_secret: POSTGRES_PASSWORD_AUTH
CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_AUTH: CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_AUTH:
from_secret: POSTGRES_DB_AUTH from_secret: POSTGRES_DB_AUTH
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API_TEST: "SAE-WHAT-THE-FANTASY-wtf-api"
#CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API_TEST: "WhatTheFantasy-wtf-api-test"
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER_API_TEST: "api-test"
CODEFIRST_CLIENTDRONE_ENV_DB_USER_API_TEST: "test" CODEFIRST_CLIENTDRONE_ENV_DB_USER_API_TEST: "test"
CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API_TEST: "test" CODEFIRST_CLIENTDRONE_ENV_DB_PASSWORD_API_TEST: "test"
CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API_TEST: "wtf-db-test" CODEFIRST_CLIENTDRONE_ENV_DB_DATABASE_API_TEST: "wtf-db-test"
ADMINS: kentinbrongniart,lenibeaulaton
ADMINS: kentinbrongniart,lenibeaulaton,kevinmondejar,louisguichard-montguers,maximerocher,tommynguyen2
depends_on: [restore & build, test, code-inspection, publish, publish-to-registry] depends_on: [restore & build, test, code-inspection, publish, publish-to-registry]

@ -1,5 +1,21 @@
# WF-PmAPI # WF-PmAPI
### Commandes de démarrage
Installer les outils dotnet
```bash
dotnet tool install --global dotnet-ef
```
Générer une migration
```bash
dotnet ef migrations add myFirstMigration
```
Générer la base de donnée
```bash
dotnet ef database update
```
### Paquets ### Paquets
- NSwag.AspNetCore <br> - NSwag.AspNetCore <br>
@ -23,13 +39,13 @@ niveau | description | coeff | jalon | État
🟢 | Tests - Appli Console | 1 | J1 | ✅ 🟢 | Tests - Appli Console | 1 | J1 | ✅
🟢 | Tests - Tests unitaires (avec SQLite in memory) | 2 | J1 | ❌ 🟢 | Tests - Tests unitaires (avec SQLite in memory) | 2 | J1 | ❌
🟢 | Tests - Données stubbées et/ou Moq | 1 | J1 | ✅ 🟢 | Tests - Données stubbées et/ou Moq | 1 | J1 | ✅
🟡 | CI : build, tests, Sonar (doc?) | 1 | J1 | 🟡 | CI : build, tests, Sonar (doc?) | 1 | J1 |
🟡 | Utilisation de relations (One-to-One, One-to-Many, Many-to-Many) (+ mapping, TU, Requêtes) | 4 | J1 | ✅ 🟡 | Utilisation de relations (One-to-One, One-to-Many, Many-to-Many) (+ mapping, TU, Requêtes) | 4 | J1 | ✅
🟢 | Liens avec le web service | 2 | J1 | ✅ 🟢 | Liens avec le web service | 2 | J1 | ✅
🟡 | Utilisation d'un *Logger* | 1 | J1 | ❌ 🟡 | Utilisation d'un *Logger* | 1 | J1 | ❌
🟡 | Déploiement | 4 | J2 | 🟡 | Déploiement | 4 | J2 |
🔴 | Unit of Work❌ / Repository✅ + extras (héritage, accès concurrents...) | 8 | J2 | 🟨 🔴 | Unit of Work❌ / Repository✅ + extras (héritage, accès concurrents...) | 8 | J2 | 🟨
🟢 | Utilisation dans le projet | 2 | J2 | 🟢 | Utilisation dans le projet | 2 | J2 |
🟢 | mon dépôt possède un readme qui apporte quelque chose... | 2 | J2 | ✅ 🟢 | mon dépôt possède un readme qui apporte quelque chose... | 2 | J2 | ✅
@ -47,13 +63,13 @@ niveau | description | coeff | jalon | État
🟢 | Requêtes GET, PUT, POST, DELETE sur des données simples (1 seul type d'objet en retour, propriétés de types natifs) | 2 | J1 | ✅ 🟢 | Requêtes GET, PUT, POST, DELETE sur des données simples (1 seul type d'objet en retour, propriétés de types natifs) | 2 | J1 | ✅
🟡 | Pagination & filtrage | 2 | J1 | ✅ 🟡 | Pagination & filtrage | 2 | J1 | ✅
🟢 | Injection de service | 2 | J1 | ✅ 🟢 | Injection de service | 2 | J1 | ✅
🟡 | Requêtes GET, PUT, POST, DELETE sur des données complexes (plusieurs données complexes en retour) | 4 | J1 | 🟨 🟡 | Requêtes GET, PUT, POST, DELETE sur des données complexes (plusieurs données complexes en retour) | 4 | J1 |
🟢 | Tests - Appli Console (consommation des requêtes) | 4 | J1 | 🟨 🟢 | Tests - Appli Console (consommation des requêtes) | 4 | J1 |
🟢 | Tests - Tests unitaires (avec Stub et/ou Moq) | 2 | J1 | 🟢 | Tests - Tests unitaires (avec Stub et/ou Moq) | 2 | J1 |
🟡 | CI : build, tests, Sonar, Documentation (en particulier Swagger avec exemples...) | 1 | J1 | 🟡 | CI : build, tests, Sonar, Documentation (en particulier Swagger avec exemples...) | 1 | J1 |
🟢 | Liens avec la persistance en base de données | 4 | J1 | ✅ 🟢 | Liens avec la persistance en base de données | 4 | J1 | ✅
🟡 | Utilisation d'un *Logger* | 1 | J1 | ❌ 🟡 | Utilisation d'un *Logger* | 1 | J1 | ❌
🟡 | Déploiement | 4 | J2 | 🟡 | Déploiement | 4 | J2 |
🟡 | Utilisation dans le projet | 4 | J2 | 🟡 | Utilisation dans le projet | 4 | J2 |
🎬 | mon dépôt possède un readme qui apporte quelque chose... | 1 | J2 | ✅ 🎬 | mon dépôt possède un readme qui apporte quelque chose... | 1 | J2 | ✅

@ -12,6 +12,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.3" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.6" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.3"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.3">

@ -176,6 +176,11 @@ namespace Contextlib
u.Password = user.Password; u.Password = user.Password;
change = true; change = true;
} }
if (user.Lang != u.Lang)
{
u.Lang = user.Lang;
change = true;
}
_repo.Update(u); _repo.Update(u);
if (change)_context.SaveChanges(); if (change)_context.SaveChanges();
} }

@ -6,7 +6,6 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Entity; using Entity;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace Contextlib namespace Contextlib
{ {
public class WTFContext : DbContext public class WTFContext : DbContext
@ -90,7 +89,12 @@ namespace Contextlib
{ {
if (!options.IsConfigured) if (!options.IsConfigured)
{ {
options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Wf-Database.mdf;Trusted_Connection=True;"); options.UseSqlServer(
$"Server={Environment.GetEnvironmentVariable("DB_SERVER_AUTH")};" +
$"Database={Environment.GetEnvironmentVariable("DB_DATABASE_AUTH")};" +
$"User Id={Environment.GetEnvironmentVariable("DB_USER_AUTH")};" +
$"Password={Environment.GetEnvironmentVariable("DB_PASSWORD_AUTH")};");
//options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Wf-Database.mdf;Trusted_Connection=True;");
} }
} }
} }

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -7,6 +7,7 @@
public string Password { get; set; } public string Password { get; set; }
public string Email { get; set; } public string Email { get; set; }
public DateTime date { get; set; } public DateTime date { get; set; }
public TypeLangageDTO Lang { get; set; }
public string ImageProfil { get; set; } public string ImageProfil { get; set; }
} }
} }

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -217,6 +217,7 @@ namespace Dto2Entities
user.Email = item.Email; user.Email = item.Email;
user.date = item.Created; user.date = item.Created;
user.ImageProfil = item.Images.ImgPath; user.ImageProfil = item.Images.ImgPath;
user.Lang = item.Lang.ToDto();
return user; return user;
} }
@ -465,6 +466,7 @@ namespace Dto2Entities
user.Created = item.date; user.Created = item.date;
user.Images = new Images(); user.Images = new Images();
user.Images.ImgPath = item.ImageProfil; user.Images.ImgPath = item.ImageProfil;
user.Lang = item.Lang.ToEntity();
return user; return user;
} }

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -17,6 +17,8 @@ namespace Entity
[Required] [Required]
[StringLength(50)] [StringLength(50)]
public string UserName { get; set; } public string UserName { get; set; }
[Required]
public LangEnum Lang { get; set; } = LangEnum.vo;
[Required] [Required]
[StringLength(50)] [StringLength(50)]

@ -28,13 +28,13 @@ namespace ServicesApi
public async Task<PaginationResult<QuoteDTO>> GetAllQuote() public async Task<PaginationResult<QuoteDTO>> GetAllQuote()
{ {
var quotes = quoteService.GetAllQuote().Result.items; var quotes = quoteService.GetAllQuote().Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), 0, quotes.Count(), quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> GetAllQuoteLang(int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> GetAllQuoteLang(int index, int pageSize, int lang)
{ {
var quotes = quoteService.GetAllQuoteLang(index, pageSize,lang).Result.items; var quotes = quoteService.GetAllQuoteLang(index, pageSize,lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<QuoteDTO> GetDailyQuote(DateOnly date, int lang) public async Task<QuoteDTO> GetDailyQuote(DateOnly date, int lang)
@ -45,19 +45,19 @@ namespace ServicesApi
public async Task<PaginationResult<QuoteDTO>> GetFavorites(int index, int pageSize, int UserId) public async Task<PaginationResult<QuoteDTO>> GetFavorites(int index, int pageSize, int UserId)
{ {
var quotes = quoteService.GetFavorites(index, pageSize, UserId).Result.items; var quotes = quoteService.GetFavorites(index, pageSize, UserId).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize, int lang)
{ {
var quotes = quoteService.GetInvalidQuote(index, pageSize, lang).Result.items; var quotes = quoteService.GetInvalidQuote(index, pageSize, lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize) public async Task<PaginationResult<QuoteDTO>> GetInvalidQuote(int index, int pageSize)
{ {
var quotes = quoteService.GetInvalidQuote(index, pageSize).Result.items; var quotes = quoteService.GetInvalidQuote(index, pageSize).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<int> GetLastQuoteId() public async Task<int> GetLastQuoteId()
@ -75,19 +75,19 @@ namespace ServicesApi
public async Task<PaginationResult<QuoteDTO>> GetSomeQuote(int index, int pageSize) public async Task<PaginationResult<QuoteDTO>> GetSomeQuote(int index, int pageSize)
{ {
var quotes = quoteService.GetSomeQuote(index, pageSize).Result.items; var quotes = quoteService.GetSomeQuote(index, pageSize).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> GetSuggestions(int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> GetSuggestions(int index, int pageSize, int lang)
{ {
var quotes = quoteService.GetSuggestions(index, pageSize, lang).Result.items; var quotes = quoteService.GetSuggestions(index, pageSize, lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> GetValidQuote(int index, int pageSize) public async Task<PaginationResult<QuoteDTO>> GetValidQuote(int index, int pageSize)
{ {
var quotes = quoteService.GetValidQuote(index, pageSize).Result.items; var quotes = quoteService.GetValidQuote(index, pageSize).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task RemoveQuote(int quoteId) public async Task RemoveQuote(int quoteId)
@ -98,19 +98,19 @@ namespace ServicesApi
public async Task<PaginationResult<QuoteDTO>> SearchByCharacter(string character, int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> SearchByCharacter(string character, int index, int pageSize, int lang)
{ {
var quotes = quoteService.SearchByCharacter(character, index, pageSize, lang).Result.items; var quotes = quoteService.SearchByCharacter(character, index, pageSize, lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> SearchByContent(string content, int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> SearchByContent(string content, int index, int pageSize, int lang)
{ {
var quotes = quoteService.SearchByContent(content, index, pageSize, lang).Result.items; var quotes = quoteService.SearchByContent(content, index, pageSize, lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task<PaginationResult<QuoteDTO>> SearchBySource(string source, int index, int pageSize, int lang) public async Task<PaginationResult<QuoteDTO>> SearchBySource(string source, int index, int pageSize, int lang)
{ {
var quotes = quoteService.SearchBySource(source, index, pageSize, lang).Result.items; var quotes = quoteService.SearchBySource(source, index, pageSize, lang).Result.items;
return new PaginationResult<QuoteDTO>(quotes.Count(), 0, 10, quotes.ToDto()); return new PaginationResult<QuoteDTO>(quotes.Count(), index, pageSize, quotes.ToDto());
} }
public async Task UpdateQuote(int quoteId, QuoteDTO quote) public async Task UpdateQuote(int quoteId, QuoteDTO quote)

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -1,86 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace StubbedContextLib.Migrations
{
/// <inheritdoc />
public partial class pm_apiV2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_comments",
table: "comments");
migrationBuilder.DeleteData(
table: "comments",
keyColumns: new[] { "IdQuote", "IdUser" },
keyValues: new object[] { 1, 2 });
migrationBuilder.DeleteData(
table: "comments",
keyColumns: new[] { "IdQuote", "IdUser" },
keyValues: new object[] { 1, 3 });
migrationBuilder.AddPrimaryKey(
name: "PK_comments",
table: "comments",
column: "Id");
migrationBuilder.InsertData(
table: "comments",
columns: new[] { "Id", "Comment", "DateCommentary", "IdQuote", "IdUser" },
values: new object[,]
{
{ 1, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 2 },
{ 2, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 3 }
});
migrationBuilder.CreateIndex(
name: "IX_comments_IdUser",
table: "comments",
column: "IdUser");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_comments",
table: "comments");
migrationBuilder.DropIndex(
name: "IX_comments_IdUser",
table: "comments");
migrationBuilder.DeleteData(
table: "comments",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "comments",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.AddPrimaryKey(
name: "PK_comments",
table: "comments",
columns: new[] { "IdUser", "IdQuote" });
migrationBuilder.InsertData(
table: "comments",
columns: new[] { "IdQuote", "IdUser", "Comment", "DateCommentary", "Id" },
values: new object[,]
{
{ 1, 2, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1 },
{ 1, 3, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 2 }
});
}
}
}

@ -2,9 +2,9 @@
using System; using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StubbedContextLib; using StubbedContextLib;
#nullable disable #nullable disable
@ -12,8 +12,8 @@ using StubbedContextLib;
namespace StubbedContextLib.Migrations namespace StubbedContextLib.Migrations
{ {
[DbContext(typeof(StubWTFContext))] [DbContext(typeof(StubWTFContext))]
[Migration("20250402113707_pm_api")] [Migration("20250403162101_myFirstMigration")]
partial class pm_api partial class myFirstMigration
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -21,20 +21,20 @@ namespace StubbedContextLib.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128); .HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Entity.Admin", b => modelBuilder.Entity("Entity.Admin", b =>
{ {
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdUsers")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("IdUsers"));
b.Property<int>("UserId") b.Property<int>("UserId")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdUsers"); b.HasKey("IdUsers");
@ -47,17 +47,17 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -130,59 +130,61 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.Commentary", b => modelBuilder.Entity("Entity.Commentary", b =>
{ {
b.Property<int>("IdUser") b.Property<int>("Id")
.HasColumnType("int"); .ValueGeneratedOnAdd()
.HasColumnType("integer");
b.Property<int>("IdQuote") NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
.HasColumnType("int");
b.Property<string>("Comment") b.Property<string>("Comment")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<DateTime>("DateCommentary") b.Property<DateTime>("DateCommentary")
.HasColumnType("date") .HasColumnType("date")
.HasColumnName("DateCommentary"); .HasColumnName("DateCommentary");
b.Property<int>("Id") b.Property<int>("IdQuote")
.ValueGeneratedOnAdd() .HasColumnType("integer");
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); b.Property<int>("IdUser")
.HasColumnType("integer");
b.HasKey("IdUser", "IdQuote"); b.HasKey("Id");
b.HasIndex("IdQuote"); b.HasIndex("IdQuote");
b.HasIndex("IdUser");
b.ToTable("comments"); b.ToTable("comments");
b.HasData( b.HasData(
new new
{ {
IdUser = 2, Id = 1,
IdQuote = 1,
Comment = "Ce film est le meilleur", Comment = "Ce film est le meilleur",
DateCommentary = new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), DateCommentary = new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = 1 IdQuote = 1,
IdUser = 2
}, },
new new
{ {
IdUser = 3, Id = 2,
IdQuote = 1,
Comment = "Very good", Comment = "Very good",
DateCommentary = new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), DateCommentary = new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified),
Id = 2 IdQuote = 1,
IdUser = 3
}); });
}); });
modelBuilder.Entity("Entity.Favorite", b => modelBuilder.Entity("Entity.Favorite", b =>
{ {
b.Property<int>("IdQuote") b.Property<int>("IdQuote")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuote", "IdUsers"); b.HasKey("IdQuote", "IdUsers");
@ -242,13 +244,13 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImgPath") b.Property<string>("ImgPath")
.IsRequired() .IsRequired()
.HasColumnType("nvarchar(max)"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -311,42 +313,42 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AnswerA") b.Property<string>("AnswerA")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerB") b.Property<string>("AnswerB")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerC") b.Property<string>("AnswerC")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerD") b.Property<string>("AnswerD")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("CorrectAnswer") b.Property<string>("CorrectAnswer")
.IsRequired() .IsRequired()
.HasMaxLength(1) .HasMaxLength(1)
.HasColumnType("nvarchar(1)"); .HasColumnType("character varying(1)");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<string>("Text") b.Property<string>("Text")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.HasKey("Id"); b.HasKey("Id");
@ -469,20 +471,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("NbQuestion") b.Property<int>("NbQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -510,10 +512,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.QuizQuestion", b => modelBuilder.Entity("Entity.QuizQuestion", b =>
{ {
b.Property<int>("IdQuestion") b.Property<int>("IdQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdQuiz") b.Property<int>("IdQuiz")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuestion", "IdQuiz"); b.HasKey("IdQuestion", "IdQuiz");
@ -578,32 +580,32 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Content") b.Property<string>("Content")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("IdCharacter") b.Property<int>("IdCharacter")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdSource") b.Property<int>("IdSource")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int?>("IdUsersPropose") b.Property<int?>("IdUsersPropose")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<int>("Langage") b.Property<int>("Langage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Likes") b.Property<int>("Likes")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -732,20 +734,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("TypeSrc") b.Property<int>("TypeSrc")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Year") b.Property<int>("Year")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -793,9 +795,9 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created") b.Property<DateTime>("Created")
.HasColumnType("date") .HasColumnType("date")
@ -804,20 +806,20 @@ namespace StubbedContextLib.Migrations
b.Property<string>("Email") b.Property<string>("Email")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Password") b.Property<string>("Password")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.Property<string>("UserName") b.Property<string>("UserName")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");

@ -1,5 +1,6 @@
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable #nullable disable
@ -8,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace StubbedContextLib.Migrations namespace StubbedContextLib.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class pm_api : Migration public partial class myFirstMigration : Migration
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
@ -17,9 +18,9 @@ namespace StubbedContextLib.Migrations
name: "images", name: "images",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ImgPath = table.Column<string>(type: "nvarchar(max)", nullable: false) ImgPath = table.Column<string>(type: "text", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -30,15 +31,15 @@ namespace StubbedContextLib.Migrations
name: "question", name: "question",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Text = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), Text = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
AnswerA = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), AnswerA = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
AnswerB = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), AnswerB = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
AnswerC = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), AnswerC = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
AnswerD = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), AnswerD = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
CorrectAnswer = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: false), CorrectAnswer = table.Column<string>(type: "character varying(1)", maxLength: 1, nullable: false),
IsValid = table.Column<bool>(type: "bit", nullable: false) IsValid = table.Column<bool>(type: "boolean", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -49,11 +50,11 @@ namespace StubbedContextLib.Migrations
name: "sources", name: "sources",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false), Title = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Year = table.Column<int>(type: "int", nullable: false), Year = table.Column<int>(type: "integer", nullable: false),
TypeSrc = table.Column<int>(type: "int", nullable: false) TypeSrc = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -64,10 +65,10 @@ namespace StubbedContextLib.Migrations
name: "characters", name: "characters",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), Name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false) IdImage = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -84,11 +85,11 @@ namespace StubbedContextLib.Migrations
name: "quizzes", name: "quizzes",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), Title = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false), IdImage = table.Column<int>(type: "integer", nullable: false),
NbQuestion = table.Column<int>(type: "int", nullable: false) NbQuestion = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -105,12 +106,12 @@ namespace StubbedContextLib.Migrations
name: "users", name: "users",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
UserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), UserName = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), Email = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
Password = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), Password = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
IdImage = table.Column<int>(type: "int", nullable: false), IdImage = table.Column<int>(type: "integer", nullable: false),
Created = table.Column<DateTime>(type: "date", nullable: false) Created = table.Column<DateTime>(type: "date", nullable: false)
}, },
constraints: table => constraints: table =>
@ -128,8 +129,8 @@ namespace StubbedContextLib.Migrations
name: "QuizQuestion", name: "QuizQuestion",
columns: table => new columns: table => new
{ {
IdQuiz = table.Column<int>(type: "int", nullable: false), IdQuiz = table.Column<int>(type: "integer", nullable: false),
IdQuestion = table.Column<int>(type: "int", nullable: false) IdQuestion = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -152,9 +153,9 @@ namespace StubbedContextLib.Migrations
name: "admins", name: "admins",
columns: table => new columns: table => new
{ {
IdUsers = table.Column<int>(type: "int", nullable: false) IdUsers = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
UserId = table.Column<int>(type: "int", nullable: false) UserId = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -171,15 +172,15 @@ namespace StubbedContextLib.Migrations
name: "quotes", name: "quotes",
columns: table => new columns: table => new
{ {
Id = table.Column<int>(type: "int", nullable: false) Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Content = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false), Content = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Likes = table.Column<int>(type: "int", nullable: false), Likes = table.Column<int>(type: "integer", nullable: false),
Langage = table.Column<int>(type: "int", nullable: false), Langage = table.Column<int>(type: "integer", nullable: false),
IsValid = table.Column<bool>(type: "bit", nullable: false), IsValid = table.Column<bool>(type: "boolean", nullable: false),
IdCharacter = table.Column<int>(type: "int", nullable: false), IdCharacter = table.Column<int>(type: "integer", nullable: false),
IdSource = table.Column<int>(type: "int", nullable: false), IdSource = table.Column<int>(type: "integer", nullable: false),
IdUsersPropose = table.Column<int>(type: "int", nullable: true) IdUsersPropose = table.Column<int>(type: "integer", nullable: true)
}, },
constraints: table => constraints: table =>
{ {
@ -207,16 +208,16 @@ namespace StubbedContextLib.Migrations
name: "comments", name: "comments",
columns: table => new columns: table => new
{ {
IdUser = table.Column<int>(type: "int", nullable: false), Id = table.Column<int>(type: "integer", nullable: false)
IdQuote = table.Column<int>(type: "int", nullable: false), .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Id = table.Column<int>(type: "int", nullable: false) IdUser = table.Column<int>(type: "integer", nullable: false),
.Annotation("SqlServer:Identity", "1, 1"), IdQuote = table.Column<int>(type: "integer", nullable: false),
DateCommentary = table.Column<DateTime>(type: "date", nullable: false), DateCommentary = table.Column<DateTime>(type: "date", nullable: false),
Comment = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false) Comment = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false)
}, },
constraints: table => constraints: table =>
{ {
table.PrimaryKey("PK_comments", x => new { x.IdUser, x.IdQuote }); table.PrimaryKey("PK_comments", x => x.Id);
table.ForeignKey( table.ForeignKey(
name: "FK_comments_quotes_IdQuote", name: "FK_comments_quotes_IdQuote",
column: x => x.IdQuote, column: x => x.IdQuote,
@ -234,8 +235,8 @@ namespace StubbedContextLib.Migrations
name: "favorites", name: "favorites",
columns: table => new columns: table => new
{ {
IdUsers = table.Column<int>(type: "int", nullable: false), IdUsers = table.Column<int>(type: "integer", nullable: false),
IdQuote = table.Column<int>(type: "int", nullable: false) IdQuote = table.Column<int>(type: "integer", nullable: false)
}, },
constraints: table => constraints: table =>
{ {
@ -377,11 +378,11 @@ namespace StubbedContextLib.Migrations
migrationBuilder.InsertData( migrationBuilder.InsertData(
table: "comments", table: "comments",
columns: new[] { "IdQuote", "IdUser", "Comment", "DateCommentary", "Id" }, columns: new[] { "Id", "Comment", "DateCommentary", "IdQuote", "IdUser" },
values: new object[,] values: new object[,]
{ {
{ 1, 2, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1 }, { 1, "Ce film est le meilleur", new DateTime(2025, 2, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 2 },
{ 1, 3, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 2 } { 2, "Very good", new DateTime(2025, 3, 11, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, 3 }
}); });
migrationBuilder.InsertData( migrationBuilder.InsertData(
@ -415,6 +416,11 @@ namespace StubbedContextLib.Migrations
table: "comments", table: "comments",
column: "IdQuote"); column: "IdQuote");
migrationBuilder.CreateIndex(
name: "IX_comments_IdUser",
table: "comments",
column: "IdUser");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_favorites_IdUsers", name: "IX_favorites_IdUsers",
table: "favorites", table: "favorites",

@ -2,9 +2,9 @@
using System; using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StubbedContextLib; using StubbedContextLib;
#nullable disable #nullable disable
@ -12,8 +12,8 @@ using StubbedContextLib;
namespace StubbedContextLib.Migrations namespace StubbedContextLib.Migrations
{ {
[DbContext(typeof(StubWTFContext))] [DbContext(typeof(StubWTFContext))]
[Migration("20250402134601_pm_apiV2")] [Migration("20250405155130_migrLangUser")]
partial class pm_apiV2 partial class migrLangUser
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -21,20 +21,20 @@ namespace StubbedContextLib.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128); .HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Entity.Admin", b => modelBuilder.Entity("Entity.Admin", b =>
{ {
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdUsers")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("IdUsers"));
b.Property<int>("UserId") b.Property<int>("UserId")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdUsers"); b.HasKey("IdUsers");
@ -47,17 +47,17 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -132,24 +132,24 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Comment") b.Property<string>("Comment")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<DateTime>("DateCommentary") b.Property<DateTime>("DateCommentary")
.HasColumnType("date") .HasColumnType("date")
.HasColumnName("DateCommentary"); .HasColumnName("DateCommentary");
b.Property<int>("IdQuote") b.Property<int>("IdQuote")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdUser") b.Property<int>("IdUser")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -181,10 +181,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.Favorite", b => modelBuilder.Entity("Entity.Favorite", b =>
{ {
b.Property<int>("IdQuote") b.Property<int>("IdQuote")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuote", "IdUsers"); b.HasKey("IdQuote", "IdUsers");
@ -244,13 +244,13 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImgPath") b.Property<string>("ImgPath")
.IsRequired() .IsRequired()
.HasColumnType("nvarchar(max)"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -313,42 +313,42 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AnswerA") b.Property<string>("AnswerA")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerB") b.Property<string>("AnswerB")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerC") b.Property<string>("AnswerC")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerD") b.Property<string>("AnswerD")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("CorrectAnswer") b.Property<string>("CorrectAnswer")
.IsRequired() .IsRequired()
.HasMaxLength(1) .HasMaxLength(1)
.HasColumnType("nvarchar(1)"); .HasColumnType("character varying(1)");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<string>("Text") b.Property<string>("Text")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.HasKey("Id"); b.HasKey("Id");
@ -471,20 +471,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("NbQuestion") b.Property<int>("NbQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -512,10 +512,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.QuizQuestion", b => modelBuilder.Entity("Entity.QuizQuestion", b =>
{ {
b.Property<int>("IdQuestion") b.Property<int>("IdQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdQuiz") b.Property<int>("IdQuiz")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuestion", "IdQuiz"); b.HasKey("IdQuestion", "IdQuiz");
@ -580,32 +580,32 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Content") b.Property<string>("Content")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("IdCharacter") b.Property<int>("IdCharacter")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdSource") b.Property<int>("IdSource")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int?>("IdUsersPropose") b.Property<int?>("IdUsersPropose")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<int>("Langage") b.Property<int>("Langage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Likes") b.Property<int>("Likes")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -734,20 +734,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("TypeSrc") b.Property<int>("TypeSrc")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Year") b.Property<int>("Year")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -795,9 +795,9 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created") b.Property<DateTime>("Created")
.HasColumnType("date") .HasColumnType("date")
@ -806,20 +806,23 @@ namespace StubbedContextLib.Migrations
b.Property<string>("Email") b.Property<string>("Email")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Lang")
.HasColumnType("integer");
b.Property<string>("Password") b.Property<string>("Password")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.Property<string>("UserName") b.Property<string>("UserName")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -834,6 +837,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "jhonDhoe@gmail.com", Email = "jhonDhoe@gmail.com",
IdImage = 1, IdImage = 1,
Lang = 0,
Password = "1234", Password = "1234",
UserName = "Jhon-Dhoe" UserName = "Jhon-Dhoe"
}, },
@ -843,6 +847,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 3, 19, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 3, 19, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "lucy_rose@outlook.com", Email = "lucy_rose@outlook.com",
IdImage = 2, IdImage = 2,
Lang = 0,
Password = "abcd", Password = "abcd",
UserName = "Lucy-Rose" UserName = "Lucy-Rose"
}, },
@ -852,6 +857,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2024, 11, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2024, 11, 2, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "mark.taylor@yahoo.com", Email = "mark.taylor@yahoo.com",
IdImage = 3, IdImage = 3,
Lang = 0,
Password = "5678", Password = "5678",
UserName = "Mark-Taylor" UserName = "Mark-Taylor"
}, },
@ -861,6 +867,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 2, 28, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 2, 28, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "sophie.martin@gmail.com", Email = "sophie.martin@gmail.com",
IdImage = 4, IdImage = 4,
Lang = 0,
Password = "4321", Password = "4321",
UserName = "Sophie-Martin" UserName = "Sophie-Martin"
}, },
@ -870,6 +877,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 1, 15, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 1, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "nathan_doe@aol.com", Email = "nathan_doe@aol.com",
IdImage = 5, IdImage = 5,
Lang = 0,
Password = "8765", Password = "8765",
UserName = "Nathan-Doe" UserName = "Nathan-Doe"
}, },
@ -879,6 +887,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 4, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 4, 7, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "ella.brown@icloud.com", Email = "ella.brown@icloud.com",
IdImage = 6, IdImage = 6,
Lang = 0,
Password = "2468", Password = "2468",
UserName = "Ella-Brown" UserName = "Ella-Brown"
}, },
@ -888,6 +897,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2024, 12, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2024, 12, 25, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "oliver_smith@gmail.com", Email = "oliver_smith@gmail.com",
IdImage = 7, IdImage = 7,
Lang = 0,
Password = "1357", Password = "1357",
UserName = "Oliver-Smith" UserName = "Oliver-Smith"
}, },
@ -897,6 +907,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 3, 5, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 3, 5, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "mia.jones@outlook.com", Email = "mia.jones@outlook.com",
IdImage = 8, IdImage = 8,
Lang = 0,
Password = "1122", Password = "1122",
UserName = "Mia-Jones" UserName = "Mia-Jones"
}, },
@ -906,6 +917,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 2, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 2, 22, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "kevin_williams@aol.com", Email = "kevin_williams@aol.com",
IdImage = 9, IdImage = 9,
Lang = 0,
Password = "2233", Password = "2233",
UserName = "Kevin-Williams" UserName = "Kevin-Williams"
}, },
@ -915,6 +927,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 1, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 1, 3, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "olivia.white@yahoo.com", Email = "olivia.white@yahoo.com",
IdImage = 10, IdImage = 10,
Lang = 0,
Password = "3344", Password = "3344",
UserName = "Olivia-White" UserName = "Olivia-White"
}); });

@ -0,0 +1,99 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StubbedContextLib.Migrations
{
/// <inheritdoc />
public partial class migrLangUser : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "Lang",
table: "users",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 1,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 2,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 3,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 4,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 5,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 6,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 7,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 8,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 9,
column: "Lang",
value: 0);
migrationBuilder.UpdateData(
table: "users",
keyColumn: "Id",
keyValue: 10,
column: "Lang",
value: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Lang",
table: "users");
}
}
}

@ -2,8 +2,8 @@
using System; using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using StubbedContextLib; using StubbedContextLib;
#nullable disable #nullable disable
@ -18,20 +18,20 @@ namespace StubbedContextLib.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128); .HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Entity.Admin", b => modelBuilder.Entity("Entity.Admin", b =>
{ {
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdUsers")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("IdUsers"));
b.Property<int>("UserId") b.Property<int>("UserId")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdUsers"); b.HasKey("IdUsers");
@ -44,17 +44,17 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -129,24 +129,24 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Comment") b.Property<string>("Comment")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<DateTime>("DateCommentary") b.Property<DateTime>("DateCommentary")
.HasColumnType("date") .HasColumnType("date")
.HasColumnName("DateCommentary"); .HasColumnName("DateCommentary");
b.Property<int>("IdQuote") b.Property<int>("IdQuote")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdUser") b.Property<int>("IdUser")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -178,10 +178,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.Favorite", b => modelBuilder.Entity("Entity.Favorite", b =>
{ {
b.Property<int>("IdQuote") b.Property<int>("IdQuote")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdUsers") b.Property<int>("IdUsers")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuote", "IdUsers"); b.HasKey("IdQuote", "IdUsers");
@ -241,13 +241,13 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ImgPath") b.Property<string>("ImgPath")
.IsRequired() .IsRequired()
.HasColumnType("nvarchar(max)"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -310,42 +310,42 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AnswerA") b.Property<string>("AnswerA")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerB") b.Property<string>("AnswerB")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerC") b.Property<string>("AnswerC")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("AnswerD") b.Property<string>("AnswerD")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<string>("CorrectAnswer") b.Property<string>("CorrectAnswer")
.IsRequired() .IsRequired()
.HasMaxLength(1) .HasMaxLength(1)
.HasColumnType("nvarchar(1)"); .HasColumnType("character varying(1)");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<string>("Text") b.Property<string>("Text")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.HasKey("Id"); b.HasKey("Id");
@ -468,20 +468,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("NbQuestion") b.Property<int>("NbQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -509,10 +509,10 @@ namespace StubbedContextLib.Migrations
modelBuilder.Entity("Entity.QuizQuestion", b => modelBuilder.Entity("Entity.QuizQuestion", b =>
{ {
b.Property<int>("IdQuestion") b.Property<int>("IdQuestion")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdQuiz") b.Property<int>("IdQuiz")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("IdQuestion", "IdQuiz"); b.HasKey("IdQuestion", "IdQuiz");
@ -577,32 +577,32 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Content") b.Property<string>("Content")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("IdCharacter") b.Property<int>("IdCharacter")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("IdSource") b.Property<int>("IdSource")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int?>("IdUsersPropose") b.Property<int?>("IdUsersPropose")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<bool>("IsValid") b.Property<bool>("IsValid")
.HasColumnType("bit"); .HasColumnType("boolean");
b.Property<int>("Langage") b.Property<int>("Langage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Likes") b.Property<int>("Likes")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -731,20 +731,20 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Title") b.Property<string>("Title")
.IsRequired() .IsRequired()
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("nvarchar(100)"); .HasColumnType("character varying(100)");
b.Property<int>("TypeSrc") b.Property<int>("TypeSrc")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Year") b.Property<int>("Year")
.HasColumnType("int"); .HasColumnType("integer");
b.HasKey("Id"); b.HasKey("Id");
@ -792,9 +792,9 @@ namespace StubbedContextLib.Migrations
{ {
b.Property<int>("Id") b.Property<int>("Id")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("int"); .HasColumnType("integer");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id")); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created") b.Property<DateTime>("Created")
.HasColumnType("date") .HasColumnType("date")
@ -803,20 +803,23 @@ namespace StubbedContextLib.Migrations
b.Property<string>("Email") b.Property<string>("Email")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.Property<int>("IdImage") b.Property<int>("IdImage")
.HasColumnType("int"); .HasColumnType("integer");
b.Property<int>("Lang")
.HasColumnType("integer");
b.Property<string>("Password") b.Property<string>("Password")
.IsRequired() .IsRequired()
.HasMaxLength(200) .HasMaxLength(200)
.HasColumnType("nvarchar(200)"); .HasColumnType("character varying(200)");
b.Property<string>("UserName") b.Property<string>("UserName")
.IsRequired() .IsRequired()
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("character varying(50)");
b.HasKey("Id"); b.HasKey("Id");
@ -831,6 +834,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 5, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "jhonDhoe@gmail.com", Email = "jhonDhoe@gmail.com",
IdImage = 1, IdImage = 1,
Lang = 0,
Password = "1234", Password = "1234",
UserName = "Jhon-Dhoe" UserName = "Jhon-Dhoe"
}, },
@ -840,6 +844,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 3, 19, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 3, 19, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "lucy_rose@outlook.com", Email = "lucy_rose@outlook.com",
IdImage = 2, IdImage = 2,
Lang = 0,
Password = "abcd", Password = "abcd",
UserName = "Lucy-Rose" UserName = "Lucy-Rose"
}, },
@ -849,6 +854,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2024, 11, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2024, 11, 2, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "mark.taylor@yahoo.com", Email = "mark.taylor@yahoo.com",
IdImage = 3, IdImage = 3,
Lang = 0,
Password = "5678", Password = "5678",
UserName = "Mark-Taylor" UserName = "Mark-Taylor"
}, },
@ -858,6 +864,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 2, 28, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 2, 28, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "sophie.martin@gmail.com", Email = "sophie.martin@gmail.com",
IdImage = 4, IdImage = 4,
Lang = 0,
Password = "4321", Password = "4321",
UserName = "Sophie-Martin" UserName = "Sophie-Martin"
}, },
@ -867,6 +874,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 1, 15, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 1, 15, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "nathan_doe@aol.com", Email = "nathan_doe@aol.com",
IdImage = 5, IdImage = 5,
Lang = 0,
Password = "8765", Password = "8765",
UserName = "Nathan-Doe" UserName = "Nathan-Doe"
}, },
@ -876,6 +884,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 4, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 4, 7, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "ella.brown@icloud.com", Email = "ella.brown@icloud.com",
IdImage = 6, IdImage = 6,
Lang = 0,
Password = "2468", Password = "2468",
UserName = "Ella-Brown" UserName = "Ella-Brown"
}, },
@ -885,6 +894,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2024, 12, 25, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2024, 12, 25, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "oliver_smith@gmail.com", Email = "oliver_smith@gmail.com",
IdImage = 7, IdImage = 7,
Lang = 0,
Password = "1357", Password = "1357",
UserName = "Oliver-Smith" UserName = "Oliver-Smith"
}, },
@ -894,6 +904,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 3, 5, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 3, 5, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "mia.jones@outlook.com", Email = "mia.jones@outlook.com",
IdImage = 8, IdImage = 8,
Lang = 0,
Password = "1122", Password = "1122",
UserName = "Mia-Jones" UserName = "Mia-Jones"
}, },
@ -903,6 +914,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 2, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 2, 22, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "kevin_williams@aol.com", Email = "kevin_williams@aol.com",
IdImage = 9, IdImage = 9,
Lang = 0,
Password = "2233", Password = "2233",
UserName = "Kevin-Williams" UserName = "Kevin-Williams"
}, },
@ -912,6 +924,7 @@ namespace StubbedContextLib.Migrations
Created = new DateTime(2025, 1, 3, 0, 0, 0, 0, DateTimeKind.Unspecified), Created = new DateTime(2025, 1, 3, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "olivia.white@yahoo.com", Email = "olivia.white@yahoo.com",
IdImage = 10, IdImage = 10,
Lang = 0,
Password = "3344", Password = "3344",
UserName = "Olivia-White" UserName = "Olivia-White"
}); });

@ -6,7 +6,9 @@ using System.Threading.Tasks;
using Contextlib; using Contextlib;
using Entity; using Entity;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Npgsql.EntityFrameworkCore.PostgreSQL;
namespace StubbedContextLib namespace StubbedContextLib
{ {
@ -143,7 +145,8 @@ namespace StubbedContextLib
{ {
if (!options.IsConfigured) if (!options.IsConfigured)
{ {
options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Wf-Database.mdf;Trusted_Connection=True;"); options.UseNpgsql("Host=WhatTheFantasy-wtf-api-test;Database=wtf-test;Username=test;Password=test;");
//options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Wf-Database.mdf;Trusted_Connection=True;");
} }
} }
} }

@ -11,6 +11,9 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />
@ -21,8 +24,4 @@
<ProjectReference Include="..\Entity\Entity.csproj" /> <ProjectReference Include="..\Entity\Entity.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project> </Project>

@ -11,6 +11,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />
<PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" /> <PackageReference Include="NSwag.Core.Yaml" Version="14.3.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" /> <PackageReference Include="NSwag.Generation.AspNetCore" Version="14.3.0" />

@ -53,7 +53,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetAllQuote(int index = 0, int count = 10) public async Task<IActionResult> GetAllQuote([FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -77,7 +77,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetAllQuoteByLang(TypeLangageDTO lang,int index = 0, int count = 10) public async Task<IActionResult> GetAllQuoteByLang([FromQuery] TypeLangageDTO lang, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -102,7 +102,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetDailyQuote([FromQuery] int year, [FromQuery] int month, [FromQuery] int day, TypeLangageDTO lang) public async Task<IActionResult> GetDailyQuote([FromQuery] int year, [FromQuery] int month, [FromQuery] int day, [FromQuery] TypeLangageDTO lang)
{ {
try try
{ {
@ -128,7 +128,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetInvalidQuote(TypeLangageDTO lang, int index = 0, int count = 10) public async Task<IActionResult> GetInvalidQuote([FromQuery] TypeLangageDTO lang, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -152,7 +152,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetSuggestQuote(TypeLangageDTO lang, int index = 0, int count = 10) public async Task<IActionResult> GetSuggestQuote([FromQuery] TypeLangageDTO lang, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -176,7 +176,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetQuoteSearchByCharacter(TypeLangageDTO lang, string character, int index = 0, int count = 10) public async Task<IActionResult> GetQuoteSearchByCharacter([FromQuery] TypeLangageDTO lang, [FromQuery] string character, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -200,7 +200,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetQuoteSearchBySource(TypeLangageDTO lang, string source, int index = 0, int count = 10) public async Task<IActionResult> GetQuoteSearchBySource([FromQuery] TypeLangageDTO lang, [FromQuery] string source, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {
@ -224,7 +224,7 @@ namespace WfApi.Controllers
[ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)] [ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetQuoteSearchByContent(TypeLangageDTO lang, string content, int index = 0, int count = 10) public async Task<IActionResult> GetQuoteSearchByContent([FromQuery] TypeLangageDTO lang, [FromQuery] string content, [FromQuery] int index = 0, [FromQuery] int count = 10)
{ {
try try
{ {

@ -64,9 +64,9 @@ namespace WfApi.Controllers
return NoContent(); return NoContent();
} }
} }
catch (Exception) catch (Exception e)
{ {
return StatusCode((int)HttpStatusCode.InternalServerError, new { message = "Internal Server Error" }); return StatusCode((int)HttpStatusCode.InternalServerError, new { message = "Internal Server Error" +e.Message + " --- " + Environment.GetEnvironmentVariable("DB_SERVER_AUTH") });
} }
} }
@ -523,7 +523,29 @@ namespace WfApi.Controllers
} }
} }
[HttpPut("lang")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> UpdateUserLang([FromQuery] int id, [FromBody] TypeLangageDTO lang)
{
try
{
var updateduser=await _user.GetUserById(id);
if (updateduser == null)
{
return BadRequest(new { message = "Player no found." });
}
updateduser.Lang = lang;
var result = _user.UpdateUser(id, updateduser);
return Ok(result);
}
catch (Exception)
{
return StatusCode((int)HttpStatusCode.InternalServerError, new { message = "Internal server error." });
}
}
//===================================== ROUTE POST ===================================== //===================================== ROUTE POST =====================================

@ -15,6 +15,7 @@
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
<PackageReference Include="NSwag.AspNetCore" Version="14.2.0" /> <PackageReference Include="NSwag.AspNetCore" Version="14.2.0" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />

@ -16,6 +16,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.3" /> <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.72" /> <PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NSwag.Core" Version="14.3.0" /> <PackageReference Include="NSwag.Core" Version="14.3.0" />

Loading…
Cancel
Save