Compare commits

...

35 Commits

Author SHA1 Message Date
Tony Fages e20c8bedc1 Mise à jour de '.drone.yml'
10 months ago
Tony Fages 434deead41 test console connect to API
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages c2a5d84d9a Merge branch 'master' of codefirst.iut.uca.fr:Verax/Verax_API_EF
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 7d05e23d56 fix bug Auth + add Console Tests on deploid API 🐛
1 year ago
Tony Fages 44edfe4bbb Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 50e52b317c ADD tests for API
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages c9d7db1ff6 fix bugs
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 36ffb41b4c Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages c42fef890a Merge pull request 'rebase' (#3) from rebase into master
continuous-integration/drone/push Build is failing Details
1 year ago
Tony Fages c75ba9a586 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 9922a67ad4 Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
1 year ago
Tony Fages 29dee05875 rebase
continuous-integration/drone/push Build is failing Details
1 year ago
Tony Fages 25630b42bb Mise à jour de '.drone.yml'
continuous-integration/drone/push Build is failing Details
1 year ago
Tony Fages 3439fac9e1 docker
continuous-integration/drone/push Build is failing Details
1 year ago
Tony Fages 3220d6acaf Dockerfile
continuous-integration/drone/push Build was killed Details
1 year ago
Tony Fages 98bfdf73a3 Merge remote-tracking branch 'origin/master'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages ecf0fb2fb6 drone
1 year ago
Louis LABORIE 550a4b86ff Supprimer 'Verax_API_EF/.gitignore'
continuous-integration/drone/push Build is failing Details
1 year ago
Louis LABORIE fc8b419bd6 Supprimer 'Verax_API_EF/README.md'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages c2a5696f1c Mise à jour de 'Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 66ea1fb216 Mise à jour de 'Verax_API_EF/Dockerfile'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages dc96308ed7 docker
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages b161253b1a docker
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 1a6b1ed501 Mise à jour de 'Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 1a7adcf6eb Mise à jour de 'Verax_API_EF/Verax_API_EF/API/Program.cs'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 96ee1e295f Mise à jour de 'Verax_API_EF/Dockerfile'
continuous-integration/drone/push Build is passing Details
1 year ago
Tony Fages 4ba3c0a93a Mise à jour de 'Verax_API_EF/Dockerfile'
continuous-integration/drone/push Build is passing Details
1 year ago
Louis LABORIE 3398be5283 Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build is passing Details
1 year ago
Louis LABORIE d891d2bbc2 Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build is failing Details
1 year ago
Louis LABORIE 50046a5a06 Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build is failing Details
1 year ago
Louis LABORIE 4ca93abf8f Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build is failing Details
1 year ago
Louis LABORIE 7ddc3151c9 Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build is failing Details
1 year ago
Louis LABORIE f7d45c6883 Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build encountered an error Details
1 year ago
Louis LABORIE b8984a52fd Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build encountered an error Details
1 year ago
Louis LABORIE 5def181a5d Try to run CD jobs 🐛🐛
continuous-integration/drone/push Build encountered an error Details
1 year ago

@ -1,6 +1,6 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: CI name: default
trigger: trigger:
event: event:
@ -10,7 +10,6 @@ steps:
- name: build - name: build
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- cd Verax_API_EF
- cd Verax_API_EF - cd Verax_API_EF
- dotnet restore Verax_API_EF.sln - dotnet restore Verax_API_EF.sln
- dotnet build Verax_API_EF.sln -c Release --no-restore - dotnet build Verax_API_EF.sln -c Release --no-restore
@ -19,7 +18,6 @@ steps:
- name: tests - name: tests
image: mcr.microsoft.com/dotnet/sdk:8.0 image: mcr.microsoft.com/dotnet/sdk:8.0
commands: commands:
- cd Verax_API_EF
- cd Verax_API_EF - cd Verax_API_EF
- dotnet restore Verax_API_EF.sln - dotnet restore Verax_API_EF.sln
- dotnet test Verax_API_EF.sln --no-restore - dotnet test Verax_API_EF.sln --no-restore
@ -34,10 +32,9 @@ steps:
from_secret: SECRET_SONAR_LOGIN # Secret de Drone from_secret: SECRET_SONAR_LOGIN # Secret de Drone
project_key: Verax_API_EF project_key: Verax_API_EF
commands: commands:
- cd Verax_API_EF/
- cd Verax_API_EF/ - cd Verax_API_EF/
- dotnet restore Verax_API_EF.sln - dotnet restore Verax_API_EF.sln
- dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Unit_Test_EF/**","API_Unit_Test/**","API_Tests_Console/**","Test_Console_EF/**","DbContextLib/Migrations/**","StubbedContextLib/**","API/Program.cs" /d:sonar.login=$${sonar_token} - dotnet sonarscanner begin /k:$${project_key} /d:sonar.host.url=$${sonar_host} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Unit_Test_EF/**","API_Unit_Test/**","API_Tests_Console/**","Test_Console_EF/**","DbContextLib/Migrations/**","StubbedContextLib/**","API/Program.cs","DbContextLib/ApplicationDbContext.cs" /d:sonar.login=$${sonar_token}
- dotnet build Verax_API_EF.sln -c Release --no-restore - dotnet build Verax_API_EF.sln -c Release --no-restore
- dotnet test Verax_API_EF.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage" - dotnet test Verax_API_EF.sln --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"
@ -50,3 +47,32 @@ steps:
- push - push
- pull_request - pull_request
depends_on: [build,tests] depends_on: [build,tests]
- name: docker-build-and-push
image: plugins/docker
settings:
dockerfile: Verax_API_EF/Dockerfile
context: Verax_API_EF
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/louis.laborie/sae_2a_api_ef
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
when:
branch:
- master
- rebase
- name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
IMAGENAME: hub.codefirst.iut.uca.fr/louis.laborie/sae_2a_api_ef:latest
CONTAINERNAME: verax-api
COMMAND: create
OVERWRITE: true
CODEFIRST_CLIENTDRONE_ENV_ASPNETCORE_HTTP_PORTS: 80
ADMINS: louislaborie,tonyfages
depends_on:
- docker-build-and-push

@ -57,6 +57,7 @@ dotnet ef migrations add mrg1 --project DbContextLib --context LibraryContext
PS: N'oubliez pas de supprimer l'ancienne base de données dans le projet API et de recommenter les lignes dans le fichier `LibraryContext.cs` PS: N'oubliez pas de supprimer l'ancienne base de données dans le projet API et de recommenter les lignes dans le fichier `LibraryContext.cs`
### Tests Console API ### Tests Console API
- Pour exécuter les tests console de l'API, assurez-vous au préalable que l'API est en cours d'exécution sur votre machine. Il est également crucial de vérifier que le port utilisé par l'application correspond à celui spécifié dans les configurations des tests. Cette vérification garantit que les tests peuvent interagir correctement avec l'API et fournir des résultats fiables. - Pour exécuter les tests console de l'API, assurez-vous au préalable que l'API est en cours d'exécution sur votre machine. Il est également crucial de vérifier que le port utilisé par l'application correspond à celui spécifié dans les configurations des tests. Cette vérification garantit que les tests peuvent interagir correctement avec l'API et fournir des résultats fiables.

@ -1,507 +0,0 @@
# ---> macOS
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# ---> JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

@ -0,0 +1,85 @@
Private property of Exodus: 16477@macbook-pro-de-fages.home
jetbrains.exodus.io.LockingManager.lock(LockingManager.kt:88)
jetbrains.exodus.io.LockingManager.lock(LockingManager.kt:39)
jetbrains.exodus.io.FileDataWriter.lock(FileDataWriter.kt:70)
jetbrains.exodus.log.Log.tryLock(Log.kt:804)
jetbrains.exodus.log.Log.<init>(Log.kt:117)
jetbrains.exodus.env.Environments.newLogInstance(Environments.kt:117)
jetbrains.exodus.env.Environments.newLogInstance(Environments.kt:81)
jetbrains.exodus.env.Environments.newLogInstance(Environments.kt:77)
jetbrains.exodus.env.Environments$newInstance$4.invoke(Environments.kt:46)
jetbrains.exodus.env.Environments$newInstance$4.invoke(Environments.kt:46)
jetbrains.exodus.env.Environments.prepare(Environments.kt:120)
jetbrains.exodus.env.Environments.newInstance(Environments.kt:46)
kotlinx.dnq.store.container.EntityStoreHelperKt.createTransientEntityStore(EntityStoreHelper.kt:40)
kotlinx.dnq.store.container.EntityStoreHelperKt.createTransientEntityStore(EntityStoreHelper.kt:31)
kotlinx.dnq.store.container.EntityStoreHelperKt.createTransientEntityStore$default(EntityStoreHelper.kt:30)
com.github.copilot.chat.session.persistence.xodus.XdChatSessionPersistenceService.initStore(XdChatSessionPersistenceService.kt:115)
com.github.copilot.chat.session.persistence.xodus.XdChatSessionPersistenceService.<init>(XdChatSessionPersistenceService.kt:22)
com.github.copilot.chat.session.persistence.xodus.XdChatSessionPersistenceService.<init>(XdChatSessionPersistenceService.kt:15)
com.github.copilot.chat.session.persistence.ChatSessionPersistenceServiceKt.ChatSessionPersistenceService(ChatSessionPersistenceService.kt:43)
com.github.copilot.chat.session.persistence.ChatSessionPersistenceServiceKt.chatSessionsPersistenceService(ChatSessionPersistenceService.kt:53)
com.github.copilot.chat.session.ChatSessionManager.<init>(ChatSessionManager.kt:45)
com.github.copilot.chat.session.ChatSessionManager.<init>(ChatSessionManager.kt:25)
com.github.copilot.chat.window.CopilotChatToolWindow.onCopilotReady(CopilotChatToolWindow.kt:133)
com.github.copilot.chat.window.CopilotChatToolWindow.access$onCopilotReady(CopilotChatToolWindow.kt:40)
com.github.copilot.chat.window.CopilotChatToolWindow$initCopilotStatusListener$1.invoke(CopilotChatToolWindow.kt:118)
com.github.copilot.chat.window.CopilotChatToolWindow$initCopilotStatusListener$1.invoke(CopilotChatToolWindow.kt:115)
com.github.copilot.status.CopilotAuthStatusKt.subscribeToCopilotAuthStatus(CopilotAuthStatus.kt:27)
com.github.copilot.chat.window.CopilotChatToolWindow.initCopilotStatusListener(CopilotChatToolWindow.kt:115)
com.github.copilot.chat.window.CopilotChatToolWindow.<init>(CopilotChatToolWindow.kt:59)
com.github.copilot.chat.window.CopilotChatToolWindow.<init>(CopilotChatToolWindow.kt:40)
com.github.copilot.chat.window.CopilotChatToolWindowFactory.init(CopilotChatToolWindowFactory.kt:18)
com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1123)
com.intellij.toolWindow.ToolWindowSetInitializerKt.registerToolWindows(ToolWindowSetInitializer.kt:223)
com.intellij.toolWindow.ToolWindowSetInitializerKt.access$registerToolWindows(ToolWindowSetInitializer.kt:1)
com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1$1.invokeSuspend(ToolWindowSetInitializer.kt:141)
com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1$1.invoke(ToolWindowSetInitializer.kt)
com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1$1.invoke(ToolWindowSetInitializer.kt)
kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:53)
com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:49)
com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1.invokeSuspend(ToolWindowSetInitializer.kt:138)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194)
com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:843)
com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:463)
com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1436)
com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:124)
com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:44)
java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:589)
com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:44)
com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589)
com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>

@ -2,6 +2,5 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component> </component>
</project> </project>

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoGeneratedRunConfigurationManager">
<projectFile profileName="http">API/API.csproj</projectFile>
<projectFile profileName="https">API/API.csproj</projectFile>
<projectFile>API_Tests_Console/API_Tests_Console.csproj</projectFile>
<projectFile>Test_Console_EF/Test_Console_EF.csproj</projectFile>
</component>
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="454eaf08-7244-4002-811f-5409ccfe6a2a" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.Verax_API_EF/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Verax_API_EF/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/API/log.txt" beforeDir="false" afterPath="$PROJECT_DIR$/API/log.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/API_Tests_Console/Tests_Console_Connect_API.cs" beforeDir="false" afterPath="$PROJECT_DIR$/API_Tests_Console/Tests_Console_Connect_API.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/API_Tests_Console/Tests_Console_Connect_Localhost.cs" beforeDir="false" afterPath="$PROJECT_DIR$/API_Tests_Console/Tests_Console_Connect_Localhost.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="MetaFilesCheckinStateConfiguration" checkMetaFiles="true" />
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 0
}</component>
<component name="ProjectId" id="2eXuZ2IMoPdjqkvkhUH8MxoFt4X" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
".NET Launch Settings Profile.API: http.executor": "Run",
".NET Project.API_Tests_Console.executor": "Run",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "master",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"vue.rearranger.settings.migration": "true"
},
"keyToStringList": {
"rider.external.source.directories": [
"/Users/tonyfages/Library/Application Support/JetBrains/Rider2023.3/resharper-host/DecompilerCache",
"/Users/tonyfages/Library/Application Support/JetBrains/Rider2023.3/resharper-host/SourcesCache",
"/Users/tonyfages/.local/share/Symbols/src"
]
}
}]]></component>
<component name="RunManager" selected=".NET Project.API_Tests_Console">
<configuration name="API_Tests_Console" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/API_Tests_Console/API_Tests_Console.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
<configuration name="Test_Console_EF" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Test_Console_EF/Test_Console_EF.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
<configuration name="API: http" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/API/API.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="http" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
<configuration name="API: https" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/API/API.csproj" />
<option name="LAUNCH_PROFILE_TFM" value="net8.0" />
<option name="LAUNCH_PROFILE_NAME" value="https" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="454eaf08-7244-4002-811f-5409ccfe6a2a" name="Changes" comment="" />
<created>1712063297753</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1712063297753</updated>
<workItem from="1712063301685" duration="548000" />
<workItem from="1712498505089" duration="6987000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="UnityCheckinConfiguration" checkUnsavedScenes="true" />
</project>

@ -6,6 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization> <InvariantGlobalization>true</InvariantGlobalization>
<StartWorkingDirectory>$(MSBuildProjectDirectory)</StartWorkingDirectory> <StartWorkingDirectory>$(MSBuildProjectDirectory)</StartWorkingDirectory>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -32,4 +33,10 @@
<ProjectReference Include="..\StubbedContextLib\StubbedContextLib.csproj" /> <ProjectReference Include="..\StubbedContextLib\StubbedContextLib.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>
</Project> </Project>

@ -1,11 +1,13 @@
using API_Mapping; using API_Mapping;
using API_Services; using API_Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Model; using Model;
namespace API.Controllers namespace API.Controllers
{ {
[Authorize]
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
public class ArticleController : ControllerBase public class ArticleController : ControllerBase

@ -5,9 +5,11 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using API_Mapping; using API_Mapping;
using Microsoft.AspNetCore.Authorization;
namespace API.Controllers namespace API.Controllers
{ {
[Authorize]
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
public class FormulaireController : ControllerBase public class FormulaireController : ControllerBase

@ -4,10 +4,12 @@ using API_Services;
using Model; using Model;
using API_Mapping; using API_Mapping;
using Entities; using Entities;
using Microsoft.AspNetCore.Authorization;
namespace API.Controllers namespace API.Controllers
{ {
[Authorize]
[Route("api/[controller]")] [Route("api/[controller]")]
[ApiController] [ApiController]
public class UserController : ControllerBase public class UserController : ControllerBase

@ -75,13 +75,18 @@ app.MapIdentityApi<IdentityUser>();
app.MapSwagger().RequireAuthorization(); app.MapSwagger().RequireAuthorization();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
/*
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(); app.UseSwaggerUI();
} }*/
app.UseSwagger();
app.UseSwaggerUI();
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization(); app.UseAuthorization();
app.MapControllers(); app.MapControllers();

@ -1649,3 +1649,736 @@ info: 03/17/2024 10:51:04.829 RelationalEventId.CommandExecuted[20101] (Microsof
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion") INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240317095050_mrg1', '8.0.3'); VALUES ('20240317095050_mrg1', '8.0.3');
info: 03/26/2024 16:12:44.693 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 03/26/2024 16:12:44.698 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 03/26/2024 16:12:44.707 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 03/26/2024 16:12:44.717 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 03/26/2024 16:12:55.642 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 03/26/2024 16:14:07.084 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 03/26/2024 16:14:07.088 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 03/26/2024 16:14:07.094 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 03/26/2024 16:14:07.103 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:49:44.132 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (14ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:49:44.137 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:49:44.148 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:49:44.159 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:49:59.839 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:49:59.843 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:49:59.849 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:49:59.858 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:50:19.847 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:50:19.853 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:50:19.859 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:50:19.868 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:50:26.477 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/02/2024 07:51:44.809 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:51:44.814 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:51:44.820 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:51:44.829 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:52:34.803 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:52:34.808 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:52:34.815 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:52:34.823 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 07:52:47.034 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:52:47.037 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 07:52:47.044 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 07:52:47.051 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 08:37:24.706 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (7ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 08:37:24.710 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/02/2024 08:37:24.717 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/02/2024 08:37:24.726 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/02/2024 08:37:34.355 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:10:11.515 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:10:11.519 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:10:11.526 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 16:10:11.535 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 16:10:55.561 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (2ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:11:07.649 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:11:26.504 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:11:26.514 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:18:06.986 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:18:06.990 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:18:06.997 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 16:18:07.006 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 16:18:13.066 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:19:31.182 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:19:33.699 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:19:35.033 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:19:53.180 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:23:05.168 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:23:05.172 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:23:05.178 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 16:23:05.186 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 16:23:10.313 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:24:36.209 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:24:36.213 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 16:24:36.219 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 16:24:36.228 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 16:26:07.617 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:31:00.483 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:32:40.093 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (2ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:32:40.185 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (3ms) [Parameters=[@p0='?' (Size = 4), @p1='?' (Size = 4), @p2='?' (Size = 4), @p3='?' (DbType = Int32), @p4='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
INSERT INTO "ArticleSet" ("Author", "DatePublished", "Description", "LectureTime", "Title")
VALUES (@p0, @p1, @p2, @p3, @p4)
RETURNING "Id";
info: 04/07/2024 16:32:40.202 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:32:44.333 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:32:55.135 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:32:55.146 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:32:55.160 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 16:32:55.166 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@p0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
DELETE FROM "ArticleSet"
WHERE "Id" = @p0
RETURNING 1;
info: 04/07/2024 16:33:02.778 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
warn: 04/07/2024 16:33:35.873 CoreEventId.RowLimitingOperationWithoutOrderByWarning[10102] (Microsoft.EntityFrameworkCore.Query)
The query uses a row limiting operator ('Skip'/'Take') without an 'OrderBy' operator. This may lead to unpredictable results. If the 'Distinct' operator is used after 'OrderBy', then make sure to use the 'OrderBy' operator after 'Distinct' as the ordering would otherwise get erased.
info: 04/07/2024 16:33:35.877 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:33:35.901 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__pseudo_0
LIMIT 1
info: 04/07/2024 16:33:35.910 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
info: 04/07/2024 16:33:35.926 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 6)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:33:35.929 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:33:35.930 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:33:35.930 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:33:35.939 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
WHERE "a"."UserEntityPseudo" = @__pseudo_0
info: 04/07/2024 16:33:35.941 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__article_ArticleEntityId_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__article_ArticleEntityId_0
LIMIT 1
warn: 04/07/2024 16:33:35.949 CoreEventId.RowLimitingOperationWithoutOrderByWarning[10102] (Microsoft.EntityFrameworkCore.Query)
The query uses a row limiting operator ('Skip'/'Take') without an 'OrderBy' operator. This may lead to unpredictable results. If the 'Distinct' operator is used after 'OrderBy', then make sure to use the 'OrderBy' operator after 'Distinct' as the ordering would otherwise get erased.
info: 04/07/2024 16:33:35.951 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:33:35.966 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
WHERE "f"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 16:33:35.969 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:33:35.974 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:33:51.891 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:33:51.901 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
WHERE "f"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 16:34:01.016 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:34:01.025 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__pseudo_0
LIMIT 1
info: 04/07/2024 16:34:01.028 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
info: 04/07/2024 16:34:01.029 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 6)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:01.029 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:01.029 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:01.029 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:01.032 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
WHERE "a"."UserEntityPseudo" = @__pseudo_0
info: 04/07/2024 16:34:01.033 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__article_ArticleEntityId_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__article_ArticleEntityId_0
LIMIT 1
info: 04/07/2024 16:34:07.857 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:34:07.866 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__pseudo_0
LIMIT 1
info: 04/07/2024 16:34:07.868 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
info: 04/07/2024 16:34:07.869 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 6)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:07.870 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:07.870 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:07.871 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:07.874 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
WHERE "a"."UserEntityPseudo" = @__pseudo_0
info: 04/07/2024 16:34:07.874 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__article_ArticleEntityId_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__article_ArticleEntityId_0
LIMIT 1
info: 04/07/2024 16:34:07.878 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:34:07.882 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:34:17.889 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:34:17.900 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__pseudo_0
LIMIT 1
info: 04/07/2024 16:34:17.902 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
info: 04/07/2024 16:34:17.903 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 6)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:17.903 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:17.903 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:17.903 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 16:34:17.905 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
WHERE "a"."UserEntityPseudo" = @__pseudo_0
info: 04/07/2024 16:34:17.905 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__article_ArticleEntityId_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__article_ArticleEntityId_0
LIMIT 1
info: 04/07/2024 16:34:17.908 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:34:17.911 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
WHERE "f"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 16:34:17.913 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 16:34:17.917 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 16:34:29.331 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 16:34:29.341 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
WHERE "f"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 18:26:44.352 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:26:44.356 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:26:44.363 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:26:44.371 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 18:28:16.315 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:28:16.320 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:28:16.326 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:28:16.335 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 18:30:50.357 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 18:31:42.064 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:31:42.068 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:31:42.075 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:31:42.083 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 18:31:49.090 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:31:49.094 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:31:49.102 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:31:49.111 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 18:35:21.368 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:35:21.372 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:35:21.379 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:35:21.387 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
warn: 04/07/2024 18:35:57.005 CoreEventId.RowLimitingOperationWithoutOrderByWarning[10102] (Microsoft.EntityFrameworkCore.Query)
The query uses a row limiting operator ('Skip'/'Take') without an 'OrderBy' operator. This may lead to unpredictable results. If the 'Distinct' operator is used after 'OrderBy', then make sure to use the 'OrderBy' operator after 'Distinct' as the ordering would otherwise get erased.
info: 04/07/2024 18:35:57.060 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (2ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 18:36:03.927 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
info: 04/07/2024 18:37:52.364 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (6ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:37:52.368 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
info: 04/07/2024 18:37:52.375 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "MigrationId", "ProductVersion"
FROM "__EFMigrationsHistory"
ORDER BY "MigrationId";
info: 04/07/2024 18:37:52.383 RelationalEventId.MigrationsNotApplied[20405] (Microsoft.EntityFrameworkCore.Migrations)
No migrations were applied. The database is already up to date.
info: 04/07/2024 18:38:20.030 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (2ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 18:38:20.078 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
warn: 04/07/2024 18:38:31.707 CoreEventId.RowLimitingOperationWithoutOrderByWarning[10102] (Microsoft.EntityFrameworkCore.Query)
The query uses a row limiting operator ('Skip'/'Take') without an 'OrderBy' operator. This may lead to unpredictable results. If the 'Distinct' operator is used after 'OrderBy', then make sure to use the 'OrderBy' operator after 'Distinct' as the ordering would otherwise get erased.
info: 04/07/2024 18:38:31.710 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 18:38:31.730 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (1ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__pseudo_0
LIMIT 1
info: 04/07/2024 18:38:31.737 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
info: 04/07/2024 18:38:31.753 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 6)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 18:38:31.756 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 18:38:31.756 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 4)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 18:38:31.756 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__articleUser_UserEntityPseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "u"."Pseudo", "u"."Mail", "u"."Mdp", "u"."Nom", "u"."Prenom", "u"."Role"
FROM "UserSet" AS "u"
WHERE "u"."Pseudo" = @__articleUser_UserEntityPseudo_0
LIMIT 1
info: 04/07/2024 18:38:31.764 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__pseudo_0='?' (Size = 3)], CommandType='Text', CommandTimeout='30']
SELECT "a"."ArticleEntityId", "a"."UserEntityPseudo"
FROM "ArticleUserSet" AS "a"
WHERE "a"."UserEntityPseudo" = @__pseudo_0
info: 04/07/2024 18:38:31.765 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__article_ArticleEntityId_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__article_ArticleEntityId_0
LIMIT 1
warn: 04/07/2024 18:38:31.774 CoreEventId.RowLimitingOperationWithoutOrderByWarning[10102] (Microsoft.EntityFrameworkCore.Query)
The query uses a row limiting operator ('Skip'/'Take') without an 'OrderBy' operator. This may lead to unpredictable results. If the 'Distinct' operator is used after 'OrderBy', then make sure to use the 'OrderBy' operator after 'Distinct' as the ordering would otherwise get erased.
info: 04/07/2024 18:38:31.776 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
LIMIT -1 OFFSET @__p_0
info: 04/07/2024 18:38:31.792 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__id_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "f"."Id", "f"."DatePublication", "f"."Link", "f"."Theme", "f"."UserEntityPseudo"
FROM "FormSet" AS "f"
WHERE "f"."Id" = @__id_0
LIMIT 1
info: 04/07/2024 18:38:31.795 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[@__p_0='?' (DbType = Int64)], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"
WHERE "a"."Id" = @__p_0
LIMIT 1
info: 04/07/2024 18:38:31.801 RelationalEventId.CommandExecuted[20101] (Microsoft.EntityFrameworkCore.Database.Command)
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT "a"."Id", "a"."Author", "a"."DatePublished", "a"."Description", "a"."LectureTime", "a"."Title"
FROM "ArticleSet" AS "a"

@ -0,0 +1,559 @@
using System.Net.Http.Headers;
namespace API_Tests_Console;
using System.Text;
using System.Text.Json;
using Entities;
using Model;
public class Tests_Console_Connect_API
{
// Cette section permet de tester d'API déployée sur le serveur codefirst de l'IUT
static readonly HttpClient client = new HttpClient();
static string email = "verax@verax.com";
static string password = "P@ssw0rd1";
public static async Task Main2(string[] args)
{
//await RegisterUser("verax@verax.com", "P@ssw0rd1");
// Ne pas commenter cette ligne
string tokenAPI = await LoginAndGetToken(email, password);
//await TestUser(tokenAPI);
//await TestFormulaire(tokenAPI);
await TestArticle(tokenAPI);
}
private static async Task TestFormulaire(string tokenAPI)
{
await TestFormulaireGetAll(tokenAPI);
await TestFormulaireGetId(tokenAPI);
//await TestFormulaireCreate(tokenAPI);
//await TestFormulaireDelete(tokenAPI);
//await TestFormulaireUpdate(tokenAPI);
}
private static async Task TestUser(string tokenAPI)
{
await TestUserGetAll(tokenAPI);
await TestUserGetId(tokenAPI);
await TestUserCreate(tokenAPI);
//await TestUserDelete(tokenAPI);
//await TestUserUpdate(tokenAPI);
await TestGetAllArticleUser(tokenAPI);
await TestGetArticleByUser(tokenAPI);
//await TestCreateArticleUser(tokenAPI);
//await TestDeleteArticleUser(tokenAPI);
//await TestUpdateArticleUser(tokenAPI);
}
static async Task TestArticle(string tokenAPI)
{
await TestArticleGetId(tokenAPI);
//await TestArticleCreate(tokenAPI);
await TestArticleGetAll(tokenAPI);
//await TestArticleDelete(tokenAPI);
//await TestArticleUpdate(tokenAPI);
}
public static async Task<string> LoginAndGetToken(string Email, string Password)
{
var credentials = new
{
email = Email,
password = Password
};
var json = JsonSerializer.Serialize(credentials);
var data = new StringContent(json, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/login", data);
var responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
using (JsonDocument doc = JsonDocument.Parse(responseBody))
{
if (doc.RootElement.TryGetProperty("accessToken", out JsonElement tokenElement)) // Change "token" to the actual property name
{
string token = tokenElement.GetString();
Console.WriteLine("Token retrieved");
return token;
}
else
{
Console.WriteLine("Token not found in the response.");
return null;
}
}
}
else
{
Console.WriteLine($"Login failed: {response.StatusCode}");
Console.WriteLine(responseBody);
return null;
}
}
catch (HttpRequestException e)
{
Console.WriteLine($"HttpRequestException: {e.Message}");
return null;
}
catch (JsonException e)
{
Console.WriteLine($"Error parsing JSON response: {e.Message}");
return null;
}
}
public static async Task<string> RegisterUser(string email, string password)
{
var newUser = new
{
email = email,
password = password
};
var json = JsonSerializer.Serialize(newUser);
var data = new StringContent(json, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/register", data);
var responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Registration successful");
Console.WriteLine(responseBody);
return responseBody;
}
else
{
Console.WriteLine($"Registration failed: {response.StatusCode}");
Console.WriteLine(responseBody);
return null;
}
}
catch (HttpRequestException e)
{
Console.WriteLine($"HttpRequestException: {e.Message}");
return null;
}
catch (Exception e)
{
Console.WriteLine($"General Exception: {e.Message}");
return null;
}
}
static async Task TestArticleGetAll(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/articles");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestArticleGetId(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/article/1");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestArticleCreate(string tokenAPI)
{
try
{
var article = new Article()
{
Title = "Test",
Description = "Test",
Author = "Test",
DatePublished = "Test",
LectureTime = 0
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(article);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/article", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestArticleDelete(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/article/1");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestArticleUpdate(string tokenAPI)
{
try
{
var article = new Article()
{
Title = "Louis",
Description = "Je",
Author = "T'",
DatePublished = "aime",
LectureTime = 0
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(article);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/article/1", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestFormulaireGetAll(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/formulaires");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestFormulaireGetId(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/formulaire/1");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestFormulaireCreate(string tokenAPI)
{
try
{
var formulaire = new Formulaire()
{
Theme = "Test",
Date = "Test",
Lien = "Test",
UserPseudo = "Sha"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(formulaire);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/formulaire", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestFormulaireDelete(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/formulaire/5");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestFormulaireUpdate(string tokenAPI)
{
try
{
var formulaire = new Formulaire()
{
Theme = "J'",
Date = "aime",
Lien = "Les",
UserPseudo = "Sha"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(formulaire);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUserGetAll(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/users");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUserGetId(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUserCreate(string tokenAPI)
{
try
{
var user = new User()
{
Pseudo = "J",
Nom = "'",
Prenom = "aime",
Mail = "les",
Mdp = "pieds",
Role = "Admin"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(user);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUserDelete(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUserUpdate(string tokenAPI)
{
try
{
var user = new User()
{
Pseudo = "Sha",
Nom = "J'",
Prenom = "aime",
Mail = "les",
Mdp = "pieds",
Role = "Admin"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(user);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestGetAllArticleUser(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/article/users");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestGetArticleByUser(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha/articles");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestCreateArticleUser(string tokenAPI)
{
try
{
var articleUser = new ArticleUserEntity()
{
ArticleEntityId = 1,
UserEntityPseudo = "Sha"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(articleUser);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/article", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestDeleteArticleUser(string tokenAPI)
{
try
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha/3");
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
static async Task TestUpdateArticleUser(string tokenAPI)
{
try
{
var articleUser = new ArticleUserEntity()
{
ArticleEntityId = 2,
UserEntityPseudo = "Sha"
};
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
long oldId = 3;
var json = JsonSerializer.Serialize(articleUser);
var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync($"https://codefirst.iut.uca.fr/containers/Verax-verax-api/user/Sha/{oldId}", data);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}

@ -1,60 +1,76 @@
// See https://aka.ms/new-console-template for more information // See https://aka.ms/new-console-template for more information
using System.Net.Http.Headers;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
using API_Tests_Console;
using Entities; using Entities;
using Model; using Model;
class Tests_Console class Tests_Console_Connect_Localhost
{ {
static readonly HttpClient client = new HttpClient();
static readonly HttpClient client = new HttpClient();
static string email = "verax@verax.com";
static string password = "P@ssw0rd1";
static async Task Main(string[] args) static async Task Main(string[] args)
{ {
await TestUser(); //Commenter lignes apres premier execution
//await TestFormulaire(); await RegisterUser(email, password);
//await TestArticle();
string tokenAPI = await LoginAndGetToken(email, password);
await TestUser(tokenAPI);
await TestFormulaire(tokenAPI);
await TestArticle(tokenAPI);
//Pour executer les tests de la console en communiquant avec l'API deployée sur codeFirst
//await Tests_Console_Connect_API.Main2(args);
} }
private static async Task TestFormulaire() private static async Task TestFormulaire(string tokenAPI)
{ {
await TestFormulaireGetAll(); await TestFormulaireGetAll(tokenAPI);
await TestFormulaireGetId(); await TestFormulaireGetId(tokenAPI);
await TestFormulaireCreate(); //await TestFormulaireCreate(tokenAPI);
await TestFormulaireDelete(); //await TestFormulaireDelete(tokenAPI);
await TestFormulaireUpdate(); //await TestFormulaireUpdate(tokenAPI);
} }
private static async Task TestUser() private static async Task TestUser(string tokenAPI)
{ {
await TestUserGetAll(); await TestUserGetAll(tokenAPI);
await TestUserGetId(); await TestUserGetId(tokenAPI);
//await TestUserCreate(); //await TestUserCreate(tokenAPI);
//await TestUserDelete(); //await TestUserDelete(tokenAPI);
//await TestUserUpdate(); //await TestUserUpdate(tokenAPI);
await TestGetAllArticleUser(); await TestGetAllArticleUser(tokenAPI);
await TestGetArticleByUser(); await TestGetArticleByUser(tokenAPI);
//await TestCreateArticleUser(); //await TestCreateArticleUser(tokenAPI);
//await TestDeleteArticleUser(); //await TestDeleteArticleUser(tokenAPI);
await TestUpdateArticleUser(); //await TestUpdateArticleUser(tokenAPI);
} }
static async Task TestArticle() static async Task TestArticle(string tokenAPI)
{ {
await TestArticleGetId(); await TestArticleGetId(tokenAPI);
await TestArticleCreate(); //await TestArticleCreate(tokenAPI);
await TestArticleGetAll(); await TestArticleGetAll(tokenAPI);
await TestArticleDelete(); //await TestArticleDelete(tokenAPI);
await TestArticleUpdate(); //await TestArticleUpdate(tokenAPI);
} }
static async Task TestArticleGetAll() static async Task TestArticleGetAll(string tokenAPI)
{ {
try try
{ {
var response = await client.GetAsync("http://localhost:5052/api/Article"); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/articles");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody); Console.WriteLine(responseBody);
@ -65,10 +81,11 @@ class Tests_Console
} }
} }
static async Task TestArticleGetId() static async Task TestArticleGetId(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/article/1"); var response = await client.GetAsync("http://localhost:5052/article/1");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -80,7 +97,7 @@ class Tests_Console
} }
} }
static async Task TestArticleCreate() static async Task TestArticleCreate(string tokenAPI)
{ {
try try
{ {
@ -92,6 +109,7 @@ class Tests_Console
DatePublished = "Test", DatePublished = "Test",
LectureTime = 0 LectureTime = 0
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(article); var json = JsonSerializer.Serialize(article);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://localhost:5052/article", data); var response = await client.PostAsync("http://localhost:5052/article", data);
@ -105,10 +123,11 @@ class Tests_Console
} }
} }
static async Task TestArticleDelete() static async Task TestArticleDelete(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("http://localhost:5052/article/1"); var response = await client.DeleteAsync("http://localhost:5052/article/1");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -120,7 +139,7 @@ class Tests_Console
} }
} }
static async Task TestArticleUpdate() static async Task TestArticleUpdate(string tokenAPI)
{ {
try try
{ {
@ -132,6 +151,7 @@ class Tests_Console
DatePublished = "aime", DatePublished = "aime",
LectureTime = 0 LectureTime = 0
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(article); var json = JsonSerializer.Serialize(article);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("http://localhost:5052/article/1", data); var response = await client.PutAsync("http://localhost:5052/article/1", data);
@ -145,10 +165,11 @@ class Tests_Console
} }
} }
static async Task TestFormulaireGetAll() static async Task TestFormulaireGetAll(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/formulaires"); var response = await client.GetAsync("http://localhost:5052/formulaires");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -160,10 +181,11 @@ class Tests_Console
} }
} }
static async Task TestFormulaireGetId() static async Task TestFormulaireGetId(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/formulaire/2"); var response = await client.GetAsync("http://localhost:5052/formulaire/2");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -175,7 +197,7 @@ class Tests_Console
} }
} }
static async Task TestFormulaireCreate() static async Task TestFormulaireCreate(string tokenAPI)
{ {
try try
{ {
@ -186,6 +208,7 @@ class Tests_Console
Lien = "Test", Lien = "Test",
UserPseudo = "Sha" UserPseudo = "Sha"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(formulaire); var json = JsonSerializer.Serialize(formulaire);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://localhost:5052/formulaire", data); var response = await client.PostAsync("http://localhost:5052/formulaire", data);
@ -199,10 +222,11 @@ class Tests_Console
} }
} }
static async Task TestFormulaireDelete() static async Task TestFormulaireDelete(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("http://localhost:5052/formulaire/5"); var response = await client.DeleteAsync("http://localhost:5052/formulaire/5");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -214,7 +238,7 @@ class Tests_Console
} }
} }
static async Task TestFormulaireUpdate() static async Task TestFormulaireUpdate(string tokenAPI)
{ {
try try
{ {
@ -225,6 +249,7 @@ class Tests_Console
Lien = "Les", Lien = "Les",
UserPseudo = "Sha" UserPseudo = "Sha"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(formulaire); var json = JsonSerializer.Serialize(formulaire);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("http://localhost:5052/formulaire/4", data); var response = await client.PutAsync("http://localhost:5052/formulaire/4", data);
@ -238,10 +263,11 @@ class Tests_Console
} }
} }
static async Task TestUserGetAll() static async Task TestUserGetAll(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/users"); var response = await client.GetAsync("http://localhost:5052/users");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -253,10 +279,11 @@ class Tests_Console
} }
} }
static async Task TestUserGetId() static async Task TestUserGetId(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/user/Sha"); var response = await client.GetAsync("http://localhost:5052/user/Sha");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -268,7 +295,7 @@ class Tests_Console
} }
} }
static async Task TestUserCreate() static async Task TestUserCreate(string tokenAPI)
{ {
try try
{ {
@ -281,6 +308,7 @@ class Tests_Console
Mdp = "pieds", Mdp = "pieds",
Role = "Admin" Role = "Admin"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(user); var json = JsonSerializer.Serialize(user);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://localhost:5052/user", data); var response = await client.PostAsync("http://localhost:5052/user", data);
@ -294,10 +322,11 @@ class Tests_Console
} }
} }
static async Task TestUserDelete() static async Task TestUserDelete(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("http://localhost:5052/user/J"); var response = await client.DeleteAsync("http://localhost:5052/user/J");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -309,7 +338,7 @@ class Tests_Console
} }
} }
static async Task TestUserUpdate() static async Task TestUserUpdate(string tokenAPI)
{ {
try try
{ {
@ -322,6 +351,7 @@ class Tests_Console
Mdp = "pieds", Mdp = "pieds",
Role = "Admin" Role = "Admin"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(user); var json = JsonSerializer.Serialize(user);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PutAsync("http://localhost:5052/user/Sha", data); var response = await client.PutAsync("http://localhost:5052/user/Sha", data);
@ -335,10 +365,11 @@ class Tests_Console
} }
} }
static async Task TestGetAllArticleUser() static async Task TestGetAllArticleUser(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/user/article/users"); var response = await client.GetAsync("http://localhost:5052/user/article/users");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -350,10 +381,11 @@ class Tests_Console
} }
} }
static async Task TestGetArticleByUser() static async Task TestGetArticleByUser(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.GetAsync("http://localhost:5052/user/Sha/articles"); var response = await client.GetAsync("http://localhost:5052/user/Sha/articles");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -365,7 +397,7 @@ class Tests_Console
} }
} }
static async Task TestCreateArticleUser() static async Task TestCreateArticleUser(string tokenAPI)
{ {
try try
{ {
@ -374,6 +406,7 @@ class Tests_Console
ArticleEntityId = 1, ArticleEntityId = 1,
UserEntityPseudo = "Sha" UserEntityPseudo = "Sha"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var json = JsonSerializer.Serialize(articleUser); var json = JsonSerializer.Serialize(articleUser);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("http://localhost:5052/user/article", data); var response = await client.PostAsync("http://localhost:5052/user/article", data);
@ -387,10 +420,11 @@ class Tests_Console
} }
} }
static async Task TestDeleteArticleUser() static async Task TestDeleteArticleUser(string tokenAPI)
{ {
try try
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
var response = await client.DeleteAsync("http://localhost:5052/user/Sha/3"); var response = await client.DeleteAsync("http://localhost:5052/user/Sha/3");
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync(); var responseBody = await response.Content.ReadAsStringAsync();
@ -402,7 +436,7 @@ class Tests_Console
} }
} }
static async Task TestUpdateArticleUser() static async Task TestUpdateArticleUser(string tokenAPI)
{ {
try try
{ {
@ -411,6 +445,7 @@ class Tests_Console
ArticleEntityId = 2, ArticleEntityId = 2,
UserEntityPseudo = "Sha" UserEntityPseudo = "Sha"
}; };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenAPI);
long oldId = 3; long oldId = 3;
var json = JsonSerializer.Serialize(articleUser); var json = JsonSerializer.Serialize(articleUser);
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
@ -425,4 +460,99 @@ class Tests_Console
} }
} }
public static async Task<string> LoginAndGetToken(string Email, string Password)
{
var credentials = new
{
email = Email,
password = Password
};
var json = JsonSerializer.Serialize(credentials);
var data = new StringContent(json, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("http://localhost:5052/login", data);
var responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
using (JsonDocument doc = JsonDocument.Parse(responseBody))
{
if (doc.RootElement.TryGetProperty("accessToken", out JsonElement tokenElement)) // Change "token" to the actual property name
{
string token = tokenElement.GetString();
Console.WriteLine("Token retrieved");
return token;
}
else
{
Console.WriteLine("Token not found in the response.");
return null;
}
}
}
else
{
Console.WriteLine($"Login failed: {response.StatusCode}");
Console.WriteLine(responseBody);
return null;
}
}
catch (HttpRequestException e)
{
Console.WriteLine($"HttpRequestException: {e.Message}");
return null;
}
catch (JsonException e)
{
Console.WriteLine($"Error parsing JSON response: {e.Message}");
return null;
}
}
public static async Task<string> RegisterUser(string email, string password)
{
var newUser = new
{
email = email,
password = password
};
var json = JsonSerializer.Serialize(newUser);
var data = new StringContent(json, Encoding.UTF8, "application/json");
try
{
var response = await client.PostAsync("http://localhost:5052/register", data);
var responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Registration successful");
Console.WriteLine(responseBody);
return responseBody;
}
else
{
Console.WriteLine($"Registration failed: {response.StatusCode}");
Console.WriteLine(responseBody);
return null;
}
}
catch (HttpRequestException e)
{
Console.WriteLine($"HttpRequestException: {e.Message}");
return null;
}
catch (Exception e)
{
Console.WriteLine($"General Exception: {e.Message}");
return null;
}
}
} }

@ -0,0 +1,35 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["API/API.csproj", "API/"]
COPY ["API_DbDataManager/API_DbDataManager.csproj", "API_DbDataManager/"]
COPY ["API_Services/API_Services.csproj", "API_Services/"]
COPY ["Entities/Entities.csproj", "Entities/"]
COPY ["Model/Model.csproj", "Model/"]
COPY ["DbContextLib/DbContextLib.csproj", "DbContextLib/"]
COPY ["StubbedContextLib/StubbedContextLib.csproj", "StubbedContextLib/"]
COPY ["API_Mapping/API_Mapping.csproj", "API_Mapping/"]
COPY ["API_Model/API_Model.csproj", "API_Model/"]
RUN dotnet restore "API/API.csproj"
COPY . .
WORKDIR "/src/API"
RUN dotnet build "API.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "API.dll"]

@ -1,5 +1,8 @@
using System.Text.Json.Serialization;
namespace Model; namespace Model;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum ArticleOrderCriteria public enum ArticleOrderCriteria
{ {
None, ByTitle, ByAuthor, ByLectureTime, ByDatePublished, ByDescription None, ByTitle, ByAuthor, ByLectureTime, ByDatePublished, ByDescription

@ -1,5 +1,9 @@
using System.Text.Json.Serialization;
namespace Model; namespace Model;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum FormOrderCriteria public enum FormOrderCriteria
{ {
None, ByTheme, ByDate, ByPseudo, ByLien None, ByTheme, ByDate, ByPseudo, ByLien

@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Model;
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum UserOrderCriteria
{
None, ByFirstName, ByLastName
}

@ -1,2 +0,0 @@
# Verax_API_EF

@ -1,15 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/.idea.Verax_API_EF.iml
/contentModel.xml
/projectSettingsUpdater.xml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# GitHub Copilot persisted chat sessions
/copilot/chatSessions

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders>
<Path>../../Verax_API_EF</Path>
</attachedFolders>
<explicitIncludes />
<explicitExcludes />
</component>
</project>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save