diff --git a/Verax_API_EF/.gitignore b/Verax_API_EF/.gitignore new file mode 100644 index 0000000..bc37588 --- /dev/null +++ b/Verax_API_EF/.gitignore @@ -0,0 +1,507 @@ +# ---> 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 + diff --git a/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml b/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml index 6c0b863..288b36b 100644 --- a/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml +++ b/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/Verax_API_EF/README.md b/Verax_API_EF/README.md new file mode 100644 index 0000000..c0ccf33 --- /dev/null +++ b/Verax_API_EF/README.md @@ -0,0 +1,2 @@ +# Verax_API_EF + diff --git a/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/.gitignore b/Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/.gitignore similarity index 100% rename from Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/.gitignore rename to Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/.gitignore diff --git a/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/indexLayout.xml b/Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/indexLayout.xml similarity index 100% rename from Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/indexLayout.xml rename to Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/indexLayout.xml diff --git a/Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml b/Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Verax_API_EF/Verax_API_EF/.idea/.idea.Verax_API_EF/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Verax_API_EF/API/API.csproj b/Verax_API_EF/Verax_API_EF/API/API.csproj similarity index 100% rename from Verax_API_EF/API/API.csproj rename to Verax_API_EF/Verax_API_EF/API/API.csproj diff --git a/Verax_API_EF/API/API.http b/Verax_API_EF/Verax_API_EF/API/API.http similarity index 100% rename from Verax_API_EF/API/API.http rename to Verax_API_EF/Verax_API_EF/API/API.http diff --git a/Verax_API_EF/API/Controllers/ArticleController.cs b/Verax_API_EF/Verax_API_EF/API/Controllers/ArticleController.cs similarity index 94% rename from Verax_API_EF/API/Controllers/ArticleController.cs rename to Verax_API_EF/Verax_API_EF/API/Controllers/ArticleController.cs index 5388d4d..2df9a5d 100644 --- a/Verax_API_EF/API/Controllers/ArticleController.cs +++ b/Verax_API_EF/Verax_API_EF/API/Controllers/ArticleController.cs @@ -1,64 +1,64 @@ -using API_Services; -using Microsoft.AspNetCore.Mvc; -using Model; - - -namespace API.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class ArticleController : ControllerBase - { - - private readonly IArticleService _articleService; - - public ArticleController(IArticleService articleService) - { - _articleService = articleService; - } - - [HttpGet("/articles")] - public async Task GetAllArticles() - { - var result = await _articleService.GetAllArticles(); - if (result == null) - { - return NotFound(); - } - return Ok(result); - } - - [HttpGet("/article/{id}")] - public async Task GetArticleById(int id) - { - var result = await _articleService.GetArticleById(id); - if (result == null) - { - return null; - } - return result; - } - - - - [HttpPost("/article")] - public async Task CreateArticle(long id, string title, string description, string author, string date, int lectureTime) - { - return await _articleService.CreateArticle(id, title, description, author, date, lectureTime); - } - - [HttpDelete("/article/{id}")] - public async Task DeleteArticle(long id) - { - return await _articleService.DeleteArticle(id); - } - - [HttpPut("/article/{id}")] - public async Task UpdateArticle(long id, ArticleEntity? a) - { - return await _articleService.UpdateArticle(id, a); - } - - - } -} +using API_Services; +using Microsoft.AspNetCore.Mvc; +using Model; + + +namespace API.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class ArticleController : ControllerBase + { + + private readonly IArticleService _articleService; + + public ArticleController(IArticleService articleService) + { + _articleService = articleService; + } + + [HttpGet] + public async Task GetAllArticles() + { + var result = await _articleService.GetAllArticles(); + if (result == null) + { + return NotFound(); + } + return Ok(result); + } + + [HttpGet("/article/{id}")] + public async Task GetArticleById(int id) + { + var result = await _articleService.GetArticleById(id); + if (result == null) + { + return null; + } + return result; + } + + + + [HttpPost("/article")] + public async Task CreateArticle(long id, string title, string description, string author, string date, int lectureTime) + { + return await _articleService.CreateArticle(id, title, description, author, date, lectureTime); + } + + [HttpDelete("/article/{id}")] + public async Task DeleteArticle(long id) + { + return await _articleService.DeleteArticle(id); + } + + [HttpPut("/article/{id}")] + public async Task UpdateArticle(long id, ArticleEntity? a) + { + return await _articleService.UpdateArticle(id, a); + } + + + } +} diff --git a/Verax_API_EF/API/Controllers/FormulaireController.cs b/Verax_API_EF/Verax_API_EF/API/Controllers/FormulaireController.cs similarity index 96% rename from Verax_API_EF/API/Controllers/FormulaireController.cs rename to Verax_API_EF/Verax_API_EF/API/Controllers/FormulaireController.cs index 653ec45..db249bd 100644 --- a/Verax_API_EF/API/Controllers/FormulaireController.cs +++ b/Verax_API_EF/Verax_API_EF/API/Controllers/FormulaireController.cs @@ -1,51 +1,51 @@ -using Microsoft.AspNetCore.Mvc; -using API_Services; -using Model; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace API.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class FormulaireController : ControllerBase - { - private readonly IFormulaireService _form; - - public FormulaireController(IFormulaireService iform) - { - this._form = iform; - } - - [HttpGet("/forms/{id}")] - public Task> GetAllForm() - { - throw new NotImplementedException(); - } - - [HttpGet("{id}")] - public Task GetById(long id) - { - throw new NotImplementedException(); - } - - [HttpPost] - public Task CreateForm(Formulaire formulaire) - { - throw new NotImplementedException(); - } - - [HttpDelete("{id}")] - public Task DeleteForm(long id) - { - throw new NotImplementedException(); - } - - [HttpPut("{id}")] - public Task UpdateForm(long id, Formulaire formulaire) - { - throw new NotImplementedException(); - } - } +using Microsoft.AspNetCore.Mvc; +using API_Services; +using Model; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace API.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class FormulaireController : ControllerBase + { + private readonly IFormulaireService _form; + + public FormulaireController(IFormulaireService iform) + { + this._form = iform; + } + + [HttpGet("/forms/{id}")] + public Task> GetAllForm() + { + throw new NotImplementedException(); + } + + [HttpGet("{id}")] + public Task GetById(long id) + { + throw new NotImplementedException(); + } + + [HttpPost] + public Task CreateForm(Formulaire formulaire) + { + throw new NotImplementedException(); + } + + [HttpDelete("{id}")] + public Task DeleteForm(long id) + { + throw new NotImplementedException(); + } + + [HttpPut("{id}")] + public Task UpdateForm(long id, Formulaire formulaire) + { + throw new NotImplementedException(); + } + } } \ No newline at end of file diff --git a/Verax_API_EF/API/Controllers/UserController.cs b/Verax_API_EF/Verax_API_EF/API/Controllers/UserController.cs similarity index 100% rename from Verax_API_EF/API/Controllers/UserController.cs rename to Verax_API_EF/Verax_API_EF/API/Controllers/UserController.cs diff --git a/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db new file mode 100644 index 0000000..f8ff2c6 Binary files /dev/null and b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db differ diff --git a/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-shm b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-shm new file mode 100644 index 0000000..17ce5c2 Binary files /dev/null and b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-shm differ diff --git a/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-wal b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-wal new file mode 100644 index 0000000..a3fd20b Binary files /dev/null and b/Verax_API_EF/Verax_API_EF/API/Entity_FrameWork.Article.db-wal differ diff --git a/Verax_API_EF/API/Program.cs b/Verax_API_EF/Verax_API_EF/API/Program.cs similarity index 82% rename from Verax_API_EF/API/Program.cs rename to Verax_API_EF/Verax_API_EF/API/Program.cs index 8ed48e2..167fa53 100644 --- a/Verax_API_EF/API/Program.cs +++ b/Verax_API_EF/Verax_API_EF/API/Program.cs @@ -18,6 +18,7 @@ builder.Services.AddSwaggerGen(); builder.Services.AddDbContext(options => { options.UseSqlite("Data Source=Entity_FrameWork.Article.db"); + }); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -33,6 +34,13 @@ if (app.Environment.IsDevelopment()) } app.UseHttpsRedirection(); +app.MapControllers(); + app.Run(); + +using var scoped = app.Services.CreateScope(); +var libraryContext = scoped.ServiceProvider.GetService(); +libraryContext.Database.EnsureCreated(); + diff --git a/Verax_API_EF/API/Properties/launchSettings.json b/Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json similarity index 100% rename from Verax_API_EF/API/Properties/launchSettings.json rename to Verax_API_EF/Verax_API_EF/API/Properties/launchSettings.json diff --git a/Verax_API_EF/API/appsettings.Development.json b/Verax_API_EF/Verax_API_EF/API/appsettings.Development.json similarity index 64% rename from Verax_API_EF/API/appsettings.Development.json rename to Verax_API_EF/Verax_API_EF/API/appsettings.Development.json index 0c208ae..3e1a225 100644 --- a/Verax_API_EF/API/appsettings.Development.json +++ b/Verax_API_EF/Verax_API_EF/API/appsettings.Development.json @@ -2,7 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning" + "Microsoft.AspNetCore": "Information" } } } diff --git a/Verax_API_EF/API/appsettings.json b/Verax_API_EF/Verax_API_EF/API/appsettings.json similarity index 69% rename from Verax_API_EF/API/appsettings.json rename to Verax_API_EF/Verax_API_EF/API/appsettings.json index 10f68b8..4282acb 100644 --- a/Verax_API_EF/API/appsettings.json +++ b/Verax_API_EF/Verax_API_EF/API/appsettings.json @@ -2,7 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning" + "Microsoft.AspNetCore": "Information" } }, "AllowedHosts": "*" diff --git a/Verax_API_EF/API_DbDataManager/API_DbDataManager.csproj b/Verax_API_EF/Verax_API_EF/API_DbDataManager/API_DbDataManager.csproj similarity index 100% rename from Verax_API_EF/API_DbDataManager/API_DbDataManager.csproj rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/API_DbDataManager.csproj diff --git a/Verax_API_EF/API_DbDataManager/DbManager.cs b/Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManager.cs similarity index 100% rename from Verax_API_EF/API_DbDataManager/DbManager.cs rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManager.cs diff --git a/Verax_API_EF/API_DbDataManager/DbManagerArticle.cs b/Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerArticle.cs similarity index 97% rename from Verax_API_EF/API_DbDataManager/DbManagerArticle.cs rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerArticle.cs index d0c6d0d..ee3176c 100644 --- a/Verax_API_EF/API_DbDataManager/DbManagerArticle.cs +++ b/Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerArticle.cs @@ -6,6 +6,7 @@ using ArticleEntity = Model.ArticleEntity; namespace DbDataManager; + public class DbManagerArticle : IArticleService { private readonly LibraryContext _context; @@ -64,8 +65,6 @@ public class DbManagerArticle : IArticleService public async Task> GetAllArticles() { - Console.WriteLine("GetAllArticles"); return await Task.FromResult(_context.ArticleSet.Select(a => a.ToModel()).AsEnumerable()); - } } \ No newline at end of file diff --git a/Verax_API_EF/API_DbDataManager/DbManagerFormulaire.cs b/Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerFormulaire.cs similarity index 100% rename from Verax_API_EF/API_DbDataManager/DbManagerFormulaire.cs rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerFormulaire.cs diff --git a/Verax_API_EF/API_DbDataManager/DbManagerUser.cs b/Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerUser.cs similarity index 100% rename from Verax_API_EF/API_DbDataManager/DbManagerUser.cs rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/DbManagerUser.cs diff --git a/Verax_API_EF/API_DbDataManager/Extensions.cs b/Verax_API_EF/Verax_API_EF/API_DbDataManager/Extensions.cs similarity index 100% rename from Verax_API_EF/API_DbDataManager/Extensions.cs rename to Verax_API_EF/Verax_API_EF/API_DbDataManager/Extensions.cs diff --git a/Verax_API_EF/API_Mapping/API_Mapping.csproj b/Verax_API_EF/Verax_API_EF/API_Mapping/API_Mapping.csproj similarity index 100% rename from Verax_API_EF/API_Mapping/API_Mapping.csproj rename to Verax_API_EF/Verax_API_EF/API_Mapping/API_Mapping.csproj diff --git a/Verax_API_EF/API_Mapping/ArticleMapper.cs b/Verax_API_EF/Verax_API_EF/API_Mapping/ArticleMapper.cs similarity index 100% rename from Verax_API_EF/API_Mapping/ArticleMapper.cs rename to Verax_API_EF/Verax_API_EF/API_Mapping/ArticleMapper.cs diff --git a/Verax_API_EF/API_Mapping/FormulaireMapping.cs b/Verax_API_EF/Verax_API_EF/API_Mapping/FormulaireMapping.cs similarity index 100% rename from Verax_API_EF/API_Mapping/FormulaireMapping.cs rename to Verax_API_EF/Verax_API_EF/API_Mapping/FormulaireMapping.cs diff --git a/Verax_API_EF/API_Mapping/UserMapping.cs b/Verax_API_EF/Verax_API_EF/API_Mapping/UserMapping.cs similarity index 100% rename from Verax_API_EF/API_Mapping/UserMapping.cs rename to Verax_API_EF/Verax_API_EF/API_Mapping/UserMapping.cs diff --git a/Verax_API_EF/API_Model/API_Model.csproj b/Verax_API_EF/Verax_API_EF/API_Model/API_Model.csproj similarity index 100% rename from Verax_API_EF/API_Model/API_Model.csproj rename to Verax_API_EF/Verax_API_EF/API_Model/API_Model.csproj diff --git a/Verax_API_EF/API_Model/ArticleDTO.cs b/Verax_API_EF/Verax_API_EF/API_Model/ArticleDTO.cs similarity index 100% rename from Verax_API_EF/API_Model/ArticleDTO.cs rename to Verax_API_EF/Verax_API_EF/API_Model/ArticleDTO.cs diff --git a/Verax_API_EF/API_Model/FormulaireDTO.cs b/Verax_API_EF/Verax_API_EF/API_Model/FormulaireDTO.cs similarity index 100% rename from Verax_API_EF/API_Model/FormulaireDTO.cs rename to Verax_API_EF/Verax_API_EF/API_Model/FormulaireDTO.cs diff --git a/Verax_API_EF/API_Model/UserDTO.cs b/Verax_API_EF/Verax_API_EF/API_Model/UserDTO.cs similarity index 100% rename from Verax_API_EF/API_Model/UserDTO.cs rename to Verax_API_EF/Verax_API_EF/API_Model/UserDTO.cs diff --git a/Verax_API_EF/API_Services/API_Services.csproj b/Verax_API_EF/Verax_API_EF/API_Services/API_Services.csproj similarity index 100% rename from Verax_API_EF/API_Services/API_Services.csproj rename to Verax_API_EF/Verax_API_EF/API_Services/API_Services.csproj diff --git a/Verax_API_EF/API_Services/IArticleService.cs b/Verax_API_EF/Verax_API_EF/API_Services/IArticleService.cs similarity index 100% rename from Verax_API_EF/API_Services/IArticleService.cs rename to Verax_API_EF/Verax_API_EF/API_Services/IArticleService.cs diff --git a/Verax_API_EF/API_Services/IFormulaireService.cs b/Verax_API_EF/Verax_API_EF/API_Services/IFormulaireService.cs similarity index 100% rename from Verax_API_EF/API_Services/IFormulaireService.cs rename to Verax_API_EF/Verax_API_EF/API_Services/IFormulaireService.cs diff --git a/Verax_API_EF/API_Services/IUserService.cs b/Verax_API_EF/Verax_API_EF/API_Services/IUserService.cs similarity index 100% rename from Verax_API_EF/API_Services/IUserService.cs rename to Verax_API_EF/Verax_API_EF/API_Services/IUserService.cs diff --git a/Verax_API_EF/DbContextLib/DbContextLib.csproj b/Verax_API_EF/Verax_API_EF/DbContextLib/DbContextLib.csproj similarity index 100% rename from Verax_API_EF/DbContextLib/DbContextLib.csproj rename to Verax_API_EF/Verax_API_EF/DbContextLib/DbContextLib.csproj diff --git a/Verax_API_EF/DbContextLib/LibraryContext.cs b/Verax_API_EF/Verax_API_EF/DbContextLib/LibraryContext.cs similarity index 98% rename from Verax_API_EF/DbContextLib/LibraryContext.cs rename to Verax_API_EF/Verax_API_EF/DbContextLib/LibraryContext.cs index ef1fc90..ec82199 100644 --- a/Verax_API_EF/DbContextLib/LibraryContext.cs +++ b/Verax_API_EF/Verax_API_EF/DbContextLib/LibraryContext.cs @@ -36,7 +36,8 @@ public class LibraryContext : DbContext .WithMany(a => a.Articles) .UsingEntity(); - modelBuilder.Entity().HasData( + + modelBuilder.Entity().HasData( new ArticleEntity { Id = 1, diff --git a/Verax_API_EF/Entities/ArticleEntity.cs b/Verax_API_EF/Verax_API_EF/Entities/ArticleEntity.cs similarity index 100% rename from Verax_API_EF/Entities/ArticleEntity.cs rename to Verax_API_EF/Verax_API_EF/Entities/ArticleEntity.cs diff --git a/Verax_API_EF/Entities/ArticleUserEntity.cs b/Verax_API_EF/Verax_API_EF/Entities/ArticleUserEntity.cs similarity index 100% rename from Verax_API_EF/Entities/ArticleUserEntity.cs rename to Verax_API_EF/Verax_API_EF/Entities/ArticleUserEntity.cs diff --git a/Verax_API_EF/Entities/Entities.csproj b/Verax_API_EF/Verax_API_EF/Entities/Entities.csproj similarity index 100% rename from Verax_API_EF/Entities/Entities.csproj rename to Verax_API_EF/Verax_API_EF/Entities/Entities.csproj diff --git a/Verax_API_EF/Entities/FormEntity.cs b/Verax_API_EF/Verax_API_EF/Entities/FormEntity.cs similarity index 100% rename from Verax_API_EF/Entities/FormEntity.cs rename to Verax_API_EF/Verax_API_EF/Entities/FormEntity.cs diff --git a/Verax_API_EF/Entities/UserEntity.cs b/Verax_API_EF/Verax_API_EF/Entities/UserEntity.cs similarity index 100% rename from Verax_API_EF/Entities/UserEntity.cs rename to Verax_API_EF/Verax_API_EF/Entities/UserEntity.cs diff --git a/Verax_API_EF/Model/ArticleEntity.cs b/Verax_API_EF/Verax_API_EF/Model/ArticleEntity.cs similarity index 100% rename from Verax_API_EF/Model/ArticleEntity.cs rename to Verax_API_EF/Verax_API_EF/Model/ArticleEntity.cs diff --git a/Verax_API_EF/Model/Formulaire.cs b/Verax_API_EF/Verax_API_EF/Model/Formulaire.cs similarity index 100% rename from Verax_API_EF/Model/Formulaire.cs rename to Verax_API_EF/Verax_API_EF/Model/Formulaire.cs diff --git a/Verax_API_EF/Model/Model.csproj b/Verax_API_EF/Verax_API_EF/Model/Model.csproj similarity index 100% rename from Verax_API_EF/Model/Model.csproj rename to Verax_API_EF/Verax_API_EF/Model/Model.csproj diff --git a/Verax_API_EF/Model/User.cs b/Verax_API_EF/Verax_API_EF/Model/User.cs similarity index 100% rename from Verax_API_EF/Model/User.cs rename to Verax_API_EF/Verax_API_EF/Model/User.cs diff --git a/Verax_API_EF/StubbedContextLib/Class1.cs b/Verax_API_EF/Verax_API_EF/StubbedContextLib/Class1.cs similarity index 100% rename from Verax_API_EF/StubbedContextLib/Class1.cs rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/Class1.cs diff --git a/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.Designer.cs b/Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.Designer.cs similarity index 100% rename from Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.Designer.cs rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.Designer.cs diff --git a/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.cs b/Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.cs similarity index 100% rename from Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.cs rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/20240307182411_mrg1.cs diff --git a/Verax_API_EF/StubbedContextLib/Migrations/StubbedContextModelSnapshot.cs b/Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/StubbedContextModelSnapshot.cs similarity index 100% rename from Verax_API_EF/StubbedContextLib/Migrations/StubbedContextModelSnapshot.cs rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/Migrations/StubbedContextModelSnapshot.cs diff --git a/Verax_API_EF/StubbedContextLib/StubTest.cs b/Verax_API_EF/Verax_API_EF/StubbedContextLib/StubTest.cs similarity index 100% rename from Verax_API_EF/StubbedContextLib/StubTest.cs rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/StubTest.cs diff --git a/Verax_API_EF/StubbedContextLib/StubbedContextLib.csproj b/Verax_API_EF/Verax_API_EF/StubbedContextLib/StubbedContextLib.csproj similarity index 100% rename from Verax_API_EF/StubbedContextLib/StubbedContextLib.csproj rename to Verax_API_EF/Verax_API_EF/StubbedContextLib/StubbedContextLib.csproj diff --git a/Verax_API_EF/Test_Console_EF/Program.cs b/Verax_API_EF/Verax_API_EF/Test_Console_EF/Program.cs similarity index 100% rename from Verax_API_EF/Test_Console_EF/Program.cs rename to Verax_API_EF/Verax_API_EF/Test_Console_EF/Program.cs diff --git a/Verax_API_EF/Test_Console_EF/Test_Console_EF.csproj b/Verax_API_EF/Verax_API_EF/Test_Console_EF/Test_Console_EF.csproj similarity index 100% rename from Verax_API_EF/Test_Console_EF/Test_Console_EF.csproj rename to Verax_API_EF/Verax_API_EF/Test_Console_EF/Test_Console_EF.csproj diff --git a/Verax_API_EF/TestsUnitaires/Properties/AssemblyInfo.cs b/Verax_API_EF/Verax_API_EF/TestsUnitaires/Properties/AssemblyInfo.cs similarity index 100% rename from Verax_API_EF/TestsUnitaires/Properties/AssemblyInfo.cs rename to Verax_API_EF/Verax_API_EF/TestsUnitaires/Properties/AssemblyInfo.cs diff --git a/Verax_API_EF/TestsUnitaires/Tests.cs b/Verax_API_EF/Verax_API_EF/TestsUnitaires/Tests.cs similarity index 100% rename from Verax_API_EF/TestsUnitaires/Tests.cs rename to Verax_API_EF/Verax_API_EF/TestsUnitaires/Tests.cs diff --git a/Verax_API_EF/TestsUnitaires/TestsUnitaires.csproj b/Verax_API_EF/Verax_API_EF/TestsUnitaires/TestsUnitaires.csproj similarity index 100% rename from Verax_API_EF/TestsUnitaires/TestsUnitaires.csproj rename to Verax_API_EF/Verax_API_EF/TestsUnitaires/TestsUnitaires.csproj diff --git a/Verax_API_EF/TestsUnitaires/packages.config b/Verax_API_EF/Verax_API_EF/TestsUnitaires/packages.config similarity index 100% rename from Verax_API_EF/TestsUnitaires/packages.config rename to Verax_API_EF/Verax_API_EF/TestsUnitaires/packages.config diff --git a/Verax_API_EF/Verax_API_EF.sln b/Verax_API_EF/Verax_API_EF/Verax_API_EF.sln similarity index 100% rename from Verax_API_EF/Verax_API_EF.sln rename to Verax_API_EF/Verax_API_EF/Verax_API_EF.sln diff --git a/Verax_API_EF/Verax_API_EF/Program.cs b/Verax_API_EF/Verax_API_EF/Verax_API_EF/Program.cs similarity index 100% rename from Verax_API_EF/Verax_API_EF/Program.cs rename to Verax_API_EF/Verax_API_EF/Verax_API_EF/Program.cs diff --git a/Verax_API_EF/Verax_API_EF/Verax_API_EF.csproj b/Verax_API_EF/Verax_API_EF/Verax_API_EF/Verax_API_EF.csproj similarity index 100% rename from Verax_API_EF/Verax_API_EF/Verax_API_EF.csproj rename to Verax_API_EF/Verax_API_EF/Verax_API_EF/Verax_API_EF.csproj