diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/AgencesController.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/AgencesController.cs index 0882ab5..30521cd 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/AgencesController.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/AgencesController.cs @@ -1,11 +1,25 @@ using espacecollab.backend.appservices; using espacecollab.backend.appservices.dtos; +using Microsoft.AspNetCore.Mvc; namespace espacecollab.backend.api.Controllers; public class AgencesController : BaseController -{ - public AgencesController(AgenceService agenceService) : base(agenceService) +{ + private AgenceService AgenceServices { get; } + + public AgencesController(AgenceService agenceServices) : base(agenceServices) { + AgenceServices = agenceServices; + } + + [HttpGet("agences/{agenceId:int:min(1)}")] + public ActionResult> GetAgencesByBusinessUnit(uint businessUnitId) + { + IEnumerable agences = AgenceServices.GetAgencesByBusinessUnit(businessUnitId); + if (!agences.Any()) + return NotFound(); + + return Ok(agences); } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BaseController.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BaseController.cs index 1a1589b..b5bb33c 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BaseController.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BaseController.cs @@ -32,7 +32,7 @@ namespace espacecollab.backend.api.Controllers } [HttpPost] - public ActionResult Add(TO apiDto) + public virtual ActionResult Add(TO apiDto) { TO? addedApiDto = Services.Add(apiDto); if (addedApiDto == null) @@ -52,7 +52,7 @@ namespace espacecollab.backend.api.Controllers } [HttpPut("{id:int:min(1)}")] - public ActionResult Update(uint id, TO apiDto) + public virtual ActionResult Update(uint id, TO apiDto) { if (apiDto.Id != id) return Unauthorized(); diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BusinessUnitsController.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BusinessUnitsController.cs index 9cba3bf..271f69a 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BusinessUnitsController.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/BusinessUnitsController.cs @@ -8,21 +8,9 @@ namespace espacecollab.backend.api.Controllers //[ApiController] public class BusinessUnitsController : BaseController { - private BusinessUnitService BusinessUnitServices { get; } - public BusinessUnitsController(BusinessUnitService businessUnitServices) : base(businessUnitServices) { - BusinessUnitServices = businessUnitServices; } - [HttpGet("agences/{agenceId:int:min(1)}")] - public ActionResult> GetBusinessUnitsByAgence(uint agenceId) - { - IEnumerable businessUnits = BusinessUnitServices.GetBusinessUnitsByAgence(agenceId); - if (!businessUnits.Any()) - return NotFound(); - - return Ok(businessUnits); - } } } diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/CollaborateursController.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/CollaborateursController.cs index 3b8af84..fe0a556 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/CollaborateursController.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Controllers/CollaborateursController.cs @@ -13,6 +13,54 @@ public class CollaborateursController : BaseController CollaborateursServices = collaborateursServices; } + [HttpPost] + public override ActionResult Add(CollaborateurApiDto apiDto) + { + (CollaborateurApiDto?,int) addedApiDto = CollaborateursServices.Add(apiDto); + if (addedApiDto.Item1 == null) + { + if(addedApiDto.Item2 == 1) + { + return Conflict("Erreur lors de la création du collaborateur : Le mail Apside renseigné est déjà utilisé pour un autre collaborateur."); + } + else if (addedApiDto.Item2 == 2) + { + return ValidationProblem("Erreur lors de la création du collaborateur : Erreur de validation de l'entité."); + } + else + return Problem("Erreur lors de la création du collaborateur : Problème interne"); + } + + return Ok(addedApiDto.Item1); + } + + [HttpPut("{id:int:min(1)}")] + public override ActionResult Update(uint id, CollaborateurApiDto apiDto) + { + if (apiDto.Id != id) + return Unauthorized(); + + (CollaborateurApiDto?, int) updatedApiDto = CollaborateursServices.Update(apiDto); + if (updatedApiDto.Item1 == null) + { + if (updatedApiDto.Item2 == 1) + { + return NoContent(); + } + else if (updatedApiDto.Item2 == 2) + { + return Conflict("Erreur lors de la mise à jour du collaborateur : Le mail Apside renseigné est déjà utilisé pour un autre collaborateur."); + } + else if (updatedApiDto.Item2 == 3) + { + return ValidationProblem("Erreur lors de la mise à jour du collaborateur : Erreur de validation de l'entité."); + } + else return Problem(); + } + + return Ok(updatedApiDto); + + } [HttpGet("businessunit/{businessUnitId:int:min(1)}")] public ActionResult> GetCollaborateursByBusinessUnit(uint businessUnitId) { diff --git a/Collaborateur_Epa_Back/espacecollab.backend.api/Register.cs b/Collaborateur_Epa_Back/espacecollab.backend.api/Register.cs index 088cd8e..569bc08 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.api/Register.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.api/Register.cs @@ -21,8 +21,8 @@ internal static class Register if (contextOptions.LoadFake) { services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); + //services.AddSingleton(); + //services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); } diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/AgenceApiDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/AgenceApiDto.cs index 630761b..b1e54c0 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/AgenceApiDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/AgenceApiDto.cs @@ -2,7 +2,7 @@ namespace espacecollab.backend.appservices.dtos; -public record AgenceApiDto(uint Id, string Name) : IGenericIdApiDto +public record AgenceApiDto(uint Id, string Name, uint BusinessUnitId) : IGenericIdApiDto { public uint Id { get; set; } = Id; } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/BusinessUnitApiDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/BusinessUnitApiDto.cs index 64a1ddf..affc044 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/BusinessUnitApiDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/BusinessUnitApiDto.cs @@ -2,7 +2,7 @@ namespace espacecollab.backend.appservices.dtos; -public record BusinessUnitApiDto(uint Id, string Name, uint AgenceId) : IGenericIdApiDto +public record BusinessUnitApiDto(uint Id, string Name) : IGenericIdApiDto { public uint Id { get; set; } = Id; } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/AgenceMapper.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/AgenceMapper.cs index bb078b5..13830a8 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/AgenceMapper.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/AgenceMapper.cs @@ -6,10 +6,10 @@ public static class AgenceMapper { public static AgenceApiDto ToApi(this AgenceSqlDto agenceSqlDto) { - return new AgenceApiDto((uint)agenceSqlDto.Id, agenceSqlDto.Name); + return new AgenceApiDto((uint)agenceSqlDto.Id, agenceSqlDto.Name,(uint)agenceSqlDto.BusinessUnitId); } public static AgenceSqlDto ToSql(this AgenceApiDto agenceApiDto) { - return new AgenceSqlDto((int)agenceApiDto.Id, agenceApiDto.Name); + return new AgenceSqlDto((int)agenceApiDto.Id, agenceApiDto.Name, (int)agenceApiDto.BusinessUnitId); } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/BusinessUnitMapper.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/BusinessUnitMapper.cs index 983558a..945e350 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/BusinessUnitMapper.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/BusinessUnitMapper.cs @@ -6,10 +6,10 @@ public static class BusinessUnitMapper { public static BusinessUnitApiDto ToApi(this BusinessUnitSqlDto businessUnitSqlDto) { - return new BusinessUnitApiDto((uint)businessUnitSqlDto.Id, businessUnitSqlDto.Name, (uint)businessUnitSqlDto.AgenceId); + return new BusinessUnitApiDto((uint)businessUnitSqlDto.Id, businessUnitSqlDto.Name); } public static BusinessUnitSqlDto ToSql(this BusinessUnitApiDto businessUnitApiDto) { - return new BusinessUnitSqlDto((int)businessUnitApiDto.Id, businessUnitApiDto.Name, (int)businessUnitApiDto.AgenceId); + return new BusinessUnitSqlDto((int)businessUnitApiDto.Id, businessUnitApiDto.Name); } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/CollaborateurApiDtoMapper.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/CollaborateurMapper.cs similarity index 100% rename from Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/CollaborateurApiDtoMapper.cs rename to Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/Mappers/CollaborateurMapper.cs diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices/AgenceService.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices/AgenceService.cs index e081882..5a863a1 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices/AgenceService.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices/AgenceService.cs @@ -7,8 +7,16 @@ namespace espacecollab.backend.appservices; public class AgenceService : GenericsServices { + private IAgenceRepository AgenceRepository { get; } + public AgenceService(IAgenceRepository agenceRepository) : base(agenceRepository, AgenceMapper.ToApi, AgenceMapper.ToSql) { + AgenceRepository = agenceRepository; + } + + public IEnumerable GetAgencesByBusinessUnit(uint businessUnitId) + { + return AgenceRepository.GetAgencesByBusinessUnit((int)businessUnitId).Select(bu => bu.ToApi()); } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices/BusinessUnitService.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices/BusinessUnitService.cs index fd306c0..343be55 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices/BusinessUnitService.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices/BusinessUnitService.cs @@ -7,14 +7,9 @@ namespace espacecollab.backend.appservices; public class BusinessUnitService : GenericsServices { - private IBusinessUnitRepository BusinessUnitRepository { get; } - public BusinessUnitService(IBusinessUnitRepository businessUnitRepository) :base(businessUnitRepository, BusinessUnitMapper.ToApi, BusinessUnitMapper.ToSql) {} - public IEnumerable GetBusinessUnitsByAgence(uint agenceId) - { - return BusinessUnitRepository.GetBusinessUnitsByAgence((int)agenceId).Select(bu => bu.ToApi()); - } + } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices/CollaborateursService.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices/CollaborateursService.cs index 81796f9..4bacdd1 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices/CollaborateursService.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices/CollaborateursService.cs @@ -15,6 +15,43 @@ public class CollaborateursService : GenericsServices apiDto.ApsideMail == collab.ApsideMail).Any()) + { + return (null,1); + } + + CollaborateurSqlDto sqlDto = apiDto.ToSql(); + + CollaborateurSqlDto? entitySqlValidation = CollaborateurRepository.Add(sqlDto); + if (entitySqlValidation == null) + return (null,2); + + return (entitySqlValidation.ToApi(),0); + } + + public (CollaborateurApiDto?,int) Update(CollaborateurApiDto apiDto) + { + if (GetById(apiDto.Id) == null) + return (null,1); + + if (GetAll().Where(collab => apiDto.ApsideMail == collab.ApsideMail && apiDto.Id != collab.Id).Any()) + { + return (null,2); + } + + + + CollaborateurSqlDto sqlDto = apiDto.ToSql(); + CollaborateurSqlDto? sqlDtoValidation = CollaborateurRepository.Update(sqlDto); + + if (sqlDtoValidation == null) + return (null,3); + + return (sqlDtoValidation.ToApi(),0); + } + public IEnumerable GetCollaborateursByBusinessUnit(uint businessUnitId) { return CollaborateurRepository.GetCollaborateursByBusinessUnit((int)businessUnitId).Select(collaborateurSql => collaborateurSql.ToApi()); diff --git a/Collaborateur_Epa_Back/espacecollab.backend.appservices/GenericsServices.cs b/Collaborateur_Epa_Back/espacecollab.backend.appservices/GenericsServices.cs index 72d8693..1fea564 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.appservices/GenericsServices.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.appservices/GenericsServices.cs @@ -34,7 +34,7 @@ public abstract class GenericsServices : IGenericsServices where T : return MapperToApiDto(entity); } - public TO? Add(TO apiDto) + public virtual TO? Add(TO apiDto) { T sqlDto = MapperToSqlDto(apiDto); @@ -45,7 +45,7 @@ public abstract class GenericsServices : IGenericsServices where T : return MapperToApiDto(entitySqlValidation); } - public TO? Update(TO apiDto) + public virtual TO? Update(TO apiDto) { if (GetById(apiDto.Id) == null) return null; diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeAgenceRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeAgenceRepository.cs index a13a56d..a8aa967 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeAgenceRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeAgenceRepository.cs @@ -3,14 +3,14 @@ using espacecollab.backend.infrastructure.sql.dtos; namespace espacecollab.backend.infrastructure.fake; -public class FakeAgenceRepository : GenericFakeRepository, IAgenceRepository -{ - public FakeAgenceRepository() - { - Context = new List - { - new(1, "Tours"), - new(2, "Clermont-Ferrand") - }; - } -} \ No newline at end of file +//public class FakeAgenceRepository : GenericFakeRepository, IAgenceRepository +//{ +// public FakeAgenceRepository() +// { +// Context = new List +// { +// new(1, "Tours"), +// new(2, "Clermont-Ferrand") +// }; +// } +//} \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeBusinessUnitRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeBusinessUnitRepository.cs index fcd8637..4c8f5f5 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeBusinessUnitRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.fake/FakeBusinessUnitRepository.cs @@ -1,21 +1,21 @@ -using espacecollab.backend.infrastructure.interfaces; -using espacecollab.backend.infrastructure.sql.dtos; +//using espacecollab.backend.infrastructure.interfaces; +//using espacecollab.backend.infrastructure.sql.dtos; -namespace espacecollab.backend.infrastructure.fake; +//namespace espacecollab.backend.infrastructure.fake; -public class FakeBusinessUnitRepository : GenericFakeRepository, IBusinessUnitRepository -{ - public FakeBusinessUnitRepository() - { - Context = new List - { - new(1, "BU 1", 1), - new(2, "BU 2", 1) - }; - } +//public class FakeBusinessUnitRepository : GenericFakeRepository, IBusinessUnitRepository +//{ +// public FakeBusinessUnitRepository() +// { +// Context = new List +// { +// new(1, "BU 1", 1), +// new(2, "BU 2", 1) +// }; +// } - public IList GetBusinessUnitsByAgence(int agenceId) - { - return Context.Where(c => c.AgenceId == agenceId).ToList(); - } -} \ No newline at end of file +// public IList GetBusinessUnitsByAgence(int agenceId) +// { +// return Context.Where(c => c.AgenceId == agenceId).ToList(); +// } +//} \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IAgenceRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IAgenceRepository.cs index e93c032..e619cc4 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IAgenceRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IAgenceRepository.cs @@ -4,4 +4,5 @@ namespace espacecollab.backend.infrastructure.interfaces; public interface IAgenceRepository : IGenericRepository { + public IList GetAgencesByBusinessUnit(int businessUnitId); } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IBusinessUnitRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IBusinessUnitRepository.cs index 0689055..5ef62a0 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IBusinessUnitRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.interfaces/IBusinessUnitRepository.cs @@ -4,5 +4,4 @@ namespace espacecollab.backend.infrastructure.interfaces; public interface IBusinessUnitRepository : IGenericRepository { - public IList GetBusinessUnitsByAgence(int agenceId); } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/AgenceSqlDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/AgenceSqlDto.cs index 5059f70..dd365b2 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/AgenceSqlDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/AgenceSqlDto.cs @@ -11,6 +11,7 @@ public class AgenceSqlDto : IGenericIdSqlDto [Key] public int Id { get; set; } public string Name { get; set; } + public int BusinessUnitId { get; set; } [ExcludeFromCodeCoverage] @@ -18,9 +19,10 @@ public class AgenceSqlDto : IGenericIdSqlDto { } - public AgenceSqlDto(int id, string name) + public AgenceSqlDto(int id, string name, int businessUnitId) { Id = id; Name = name; + BusinessUnitId = businessUnitId; } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/BusinessUnitSqlDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/BusinessUnitSqlDto.cs index ce6534e..8e06d9b 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/BusinessUnitSqlDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/BusinessUnitSqlDto.cs @@ -11,7 +11,6 @@ public class BusinessUnitSqlDto : IGenericIdSqlDto [Key] public int Id { get; set; } public string Name { get; set; } - public int AgenceId { get; set; } [ExcludeFromCodeCoverage] @@ -19,10 +18,9 @@ public class BusinessUnitSqlDto : IGenericIdSqlDto { } - public BusinessUnitSqlDto(int id, string name, int agenceId) + public BusinessUnitSqlDto(int id, string name) { Id = id; Name = name; - AgenceId = agenceId; } } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs index 1f7f0bd..59b5eea 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs @@ -24,9 +24,19 @@ public class MainDbContext : DbContext protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); + + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); + modelBuilder + .Entity() + .Property(e => e.Issue) + .HasConversion(); + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); modelBuilder .Entity() diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/AgenceSqlRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/AgenceSqlRepository.cs index a5f569b..2cfd895 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/AgenceSqlRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/AgenceSqlRepository.cs @@ -8,4 +8,7 @@ public class AgenceSqlRepository : GenericSqlRepository, IAgenceRe public AgenceSqlRepository(MainDbContext context) : base(context) { } + + public IList GetAgencesByBusinessUnit(int businessUnitId) + => Context.Set().Where(bu => bu.BusinessUnitId == businessUnitId).ToList(); } \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/BusinessUnitSqlRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/BusinessUnitSqlRepository.cs index 85e47c0..f7dce39 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/BusinessUnitSqlRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/Repository/BusinessUnitSqlRepository.cs @@ -9,6 +9,5 @@ public class BusinessUnitSqlRepository : GenericSqlRepository GetBusinessUnitsByAgence(int agenceId) - => Context.Set().Where(bu => bu.AgenceId == agenceId).ToList(); + } \ No newline at end of file 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 deleted file mode 100644 index 411b0c6..0000000 Binary files a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/db/init_db.sql - Raccourci.lnk and /dev/null differ diff --git a/Collaborateur_Epa_Back/espacecollab.backend.sln b/Collaborateur_Epa_Back/espacecollab.backend.sln index 3def954..d16a1b6 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.sln +++ b/Collaborateur_Epa_Back/espacecollab.backend.sln @@ -27,12 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "espacecollab.backend.appser EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "espacecollab.backend.api.tests", "espacecollab.backend.api.tests\espacecollab.backend.api.tests.csproj", "{5EA7CAB6-B7A8-4A54-8A1D-774A376974CB}" EndProject -Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{815B6ABD-7550-4D79-A53B-E84F4D4A7475}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "9 Database", "9 Database", "{4C74D622-BEC1-41C9-95F1-7C44375B531B}" - ProjectSection(SolutionItems) = preProject - init_db.sql = init_db.sql - EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -76,10 +71,6 @@ Global {5EA7CAB6-B7A8-4A54-8A1D-774A376974CB}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EA7CAB6-B7A8-4A54-8A1D-774A376974CB}.Release|Any CPU.ActiveCfg = Release|Any CPU {5EA7CAB6-B7A8-4A54-8A1D-774A376974CB}.Release|Any CPU.Build.0 = Release|Any CPU - {815B6ABD-7550-4D79-A53B-E84F4D4A7475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {815B6ABD-7550-4D79-A53B-E84F4D4A7475}.Debug|Any CPU.Build.0 = Debug|Any CPU - {815B6ABD-7550-4D79-A53B-E84F4D4A7475}.Release|Any CPU.ActiveCfg = Release|Any CPU - {815B6ABD-7550-4D79-A53B-E84F4D4A7475}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE