diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Properties/launchSettings.json b/Collaborateur_Epa_Back/espacecollab.backend.api/Properties/launchSettings.json index 8505599..c08dccf 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Properties/launchSettings.json +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Properties/launchSettings.json @@ -16,7 +16,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "https://localhost:8081;http://localhost:8080", + "applicationUrl": "https://localhost:5001;http://localhost:5000", "dotnetRunMessages": true }, "IIS Express": { diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Startup.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Startup.cs index 7e053de..9561ab5 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Startup.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Startup.cs @@ -38,7 +38,7 @@ public class Startup app.UseDeveloperExceptionPage(); } app.UseCors( - options => options.WithOrigins("http://localhost:4200", "http://localhost:8082", "http://localhost:8083").AllowAnyMethod().AllowAnyHeader() + options => options.WithOrigins("http://localhost:4200", "http://localhost:8082", "http://localhost:8083", "http://localhost:5000", "http://localhost:5001").AllowAnyMethod().AllowAnyHeader() ); app.UseSwagger(); app.UseSwaggerUI(); diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.json b/Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.json index ed4dac8..64f8b67 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.json +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.json @@ -8,7 +8,8 @@ "AllowedHosts": "*", "Sql": { "LoadFake": false, - //"ConnectionString": "server=db;user=root;password=root;database=collaborateur_epa" - "ConnectionString": "server=localhost;user=root;password=root;database=collaborateur_epa" + "ConnectionString": "server=database;user=root;password=root;database=collaborateur_epa" //préprod + //"ConnectionString": "server=db;user=root;password=root;database=collaborateur_epa" //docker-compose + //"ConnectionString": "server=localhost;user=root;password=root;database=collaborateur_epa" //local } } diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/GenericSqlRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/GenericSqlRepository.cs index 532ea08..abb0343 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/GenericSqlRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/GenericSqlRepository.cs @@ -43,6 +43,7 @@ public class GenericSqlRepository : IGenericRepository where T : class, IG public virtual T? Update(T entity) { + Context.ChangeTracker.Clear(); Context.Set().Update(entity); Context.SaveChanges(); diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/db/init_db.sql - Raccourci.lnk b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/db/init_db.sql - Raccourci.lnk new file mode 100644 index 0000000..411b0c6 Binary files /dev/null and b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/db/init_db.sql - Raccourci.lnk differ