Browse Source

CHG Correction modèle de données

olivier.massot 7 years ago
parent
commit
c6427846be
33 changed files with 886 additions and 377 deletions
  1. 0 5
      CD67.FicheCollege.BDD/Annees.sql
  2. 0 94
      CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.refactorlog
  3. 13 9
      CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj
  4. 0 22
      CD67.FicheCollege.BDD/Colleges.sql
  5. 0 33
      CD67.FicheCollege.BDD/Identites.sql
  6. 0 12
      CD67.FicheCollege.BDD/Territoires.sql
  7. 0 6
      CD67.FicheCollege.BDD/TypesCollege.sql
  8. 8 0
      CD67.FicheCollege.BDD/dbo/Tables/ActionAxes.sql
  9. 15 0
      CD67.FicheCollege.BDD/dbo/Tables/ActionThematiques.sql
  10. 16 0
      CD67.FicheCollege.BDD/dbo/Tables/Actions.sql
  11. 6 0
      CD67.FicheCollege.BDD/dbo/Tables/Annees.sql
  12. 38 0
      CD67.FicheCollege.BDD/dbo/Tables/Colleges.sql
  13. 34 0
      CD67.FicheCollege.BDD/dbo/Tables/Identites.sql
  14. 13 0
      CD67.FicheCollege.BDD/dbo/Tables/Territoires.sql
  15. 7 0
      CD67.FicheCollege.BDD/dbo/Tables/TypesCollege.sql
  16. 26 0
      CD67.FicheCollege.Entity/Action.cs
  17. 32 0
      CD67.FicheCollege.Entity/ActionAxe.cs
  18. 34 0
      CD67.FicheCollege.Entity/ActionThematique.cs
  19. 12 0
      CD67.FicheCollege.Entity/CD67.FicheCollege.Entity.csproj
  20. 3 0
      CD67.FicheCollege.Entity/EntityModel.Context.cs
  21. 327 160
      CD67.FicheCollege.Entity/EntityModel.edmx
  22. 6 1
      CD67.FicheCollege.Entity/EntityModel.edmx.diagram
  23. 109 32
      CD67.FicheCollege.Entity/EntityModel.edmx.sql
  24. 38 0
      CD67.FicheCollege.Entity/Extend/Action.cs
  25. 35 0
      CD67.FicheCollege.Entity/Extend/ActionAxe.cs
  26. 35 0
      CD67.FicheCollege.Entity/Extend/ActionThematique.cs
  27. 9 0
      CD67.FicheCollege.Factory/CD67.FicheCollege.Factory.csproj
  28. 21 0
      CD67.FicheCollege.Factory/Internal/ActionAxeFactory.cs
  29. 21 0
      CD67.FicheCollege.Factory/Internal/ActionFactory.cs
  30. 21 0
      CD67.FicheCollege.Factory/Internal/ActionThematiqueFactory.cs
  31. 1 1
      CD67.FicheCollege.MVC/Views/Admin/Index.cshtml
  32. 5 1
      CD67.FicheCollege.MVC/Views/Annees/Details.cshtml
  33. 1 1
      CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

+ 0 - 5
CD67.FicheCollege.BDD/Annees.sql

@@ -1,5 +0,0 @@
-CREATE TABLE [dbo].[Annees] (
-    [Id] int IDENTITY(1,1) NOT NULL  PRIMARY KEY,
-    [Libelle] nvarchar(12)  NOT NULL
-);
-

+ 0 - 94
CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.refactorlog

@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Operations Version="1.0" xmlns="http://schemas.microsoft.com/sqlserver/dac/Serialization/2012/02">
-  <Operation Name="Rename Refactor" Key="747db0c4-c630-4deb-9703-64837498b956" ChangeDateTime="11/24/2017 10:03:54">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[Nom]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="ReferentNom" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="e94032d9-17d3-4795-a12e-0a8220ce352f" ChangeDateTime="11/24/2017 10:04:01">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[Prénom]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="ReferentPrenom" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="eacea97e-6d3e-449b-ab2f-f1b4ed1c3aa3" ChangeDateTime="11/24/2017 10:04:03">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[Structure]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="ReferentStructure" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="f8bfd88e-b4a5-4400-8016-7aba9737f14a" ChangeDateTime="11/24/2017 10:04:05">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[Login]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="ReferentLogin" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="966a74e9-c0dd-43d7-ae4f-c951a9d7b08c" ChangeDateTime="11/24/2017 10:05:02">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[ReferentNom]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Referent_Nom" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="ad56fd49-703e-4d3b-b895-0ded61bee59d" ChangeDateTime="11/24/2017 10:05:04">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[ReferentPrenom]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Referent_Prenom" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="be0373ca-fad3-4137-9183-fb6a3f701f6f" ChangeDateTime="11/24/2017 10:05:06">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[ReferentLogin]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Referent_Login" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="488ceaba-6e3f-4265-900b-f57c6e761cca" ChangeDateTime="11/24/2017 10:05:08">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[ReferentStructure]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Referent_Structure" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="5550ca8b-5eaf-4ccb-8b08-e5509e257b75" ChangeDateTime="11/24/2017 10:05:16">
-    <Property Name="ElementName" Value="[dbo].[Territoires].[SID]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Territoires]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Referent_SID" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="733e13cf-50d0-43ce-b246-b440fad4771d" ChangeDateTime="01/08/2018 17:04:16">
-    <Property Name="ElementName" Value="[dbo].[College].[Code_TAD]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[College]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Territoire_Id" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="8145a11a-e0c9-4b98-887b-77f0639a3fdf" ChangeDateTime="01/10/2018 09:09:22">
-    <Property Name="ElementName" Value="[dbo].[FicheIdentite].[Id]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[FicheIdentite]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="College_Id" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="fadf50e8-62b2-46e4-b427-254e6321825b" ChangeDateTime="01/11/2018 16:43:18">
-    <Property Name="ElementName" Value="[dbo].[Actions_CLAS].[b]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Actions_CLAS]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Action" />
-  </Operation>
-  <Operation Name="Rename Refactor" Key="845f4240-dd04-4510-afce-e01d0ff501bc" ChangeDateTime="02/01/2018 09:41:57">
-    <Property Name="ElementName" Value="[dbo].[Annees].[libelle]" />
-    <Property Name="ElementType" Value="SqlSimpleColumn" />
-    <Property Name="ParentElementName" Value="[dbo].[Annees]" />
-    <Property Name="ParentElementType" Value="SqlTable" />
-    <Property Name="NewName" Value="Libelle" />
-  </Operation>
-</Operations>

+ 13 - 9
CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj

@@ -14,7 +14,7 @@
     </RootPath>
     <RootNamespace>CD67.FicheCollege.BDD</RootNamespace>
     <AssemblyName>CD67.FicheCollege.BDD</AssemblyName>
-    <ModelCollation>1033, CI</ModelCollation>
+    <ModelCollation>1033,CI</ModelCollation>
     <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure>
     <DeployToDatabase>True</DeployToDatabase>
     <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
@@ -24,6 +24,8 @@
     <IncludeCompositeObjects>True</IncludeCompositeObjects>
     <TargetDatabaseSet>True</TargetDatabaseSet>
     <TargetFrameworkProfile />
+    <DefaultCollation>Latin1_General_CI_AS_KS_WS</DefaultCollation>
+    <DefaultFilegroup>PRIMARY</DefaultFilegroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <OutputPath>bin\Release\</OutputPath>
@@ -58,15 +60,17 @@
   <Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
   <ItemGroup>
     <Folder Include="Properties" />
+    <Folder Include="dbo\" />
+    <Folder Include="dbo\Tables\" />
   </ItemGroup>
   <ItemGroup>
-    <Build Include="TypesCollege.sql" />
-    <Build Include="Territoires.sql" />
-    <Build Include="Colleges.sql" />
-    <Build Include="Identites.sql" />
-    <Build Include="Annees.sql" />
-  </ItemGroup>
-  <ItemGroup>
-    <RefactorLog Include="CD67.FicheCollege.BDD.refactorlog" />
+    <Build Include="dbo\Tables\TypesCollege.sql" />
+    <Build Include="dbo\Tables\Territoires.sql" />
+    <Build Include="dbo\Tables\Colleges.sql" />
+    <Build Include="dbo\Tables\Identites.sql" />
+    <Build Include="dbo\Tables\Annees.sql" />
+    <Build Include="dbo\Tables\ActionAxes.sql" />
+    <Build Include="dbo\Tables\ActionThematiques.sql" />
+    <Build Include="dbo\Tables\Actions.sql" />
   </ItemGroup>
 </Project>

+ 0 - 22
CD67.FicheCollege.BDD/Colleges.sql

@@ -1,22 +0,0 @@
-CREATE TABLE [dbo].[Colleges]
-(
-	[Id] INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
-    [Annee_Id] int  NOT NULL,
-	[CodeRne] NVARCHAR(10) NOT NULL, 
-	[Libelle] NVARCHAR(255) NOT NULL,
-	[Adresse] NVARCHAR(255) NULL, 
-	[Code_Postal] NVARCHAR(5) NULL, 
-    [TypeCollege_Id] INT NOT NULL, 
-	[Commune_Insee] NVARCHAR(5) NULL, 
-	[Commune] NVARCHAR(255) NOT NULL, 
-    [Canton] NVARCHAR(255) NULL, 
-    [Territoire_Id] NVARCHAR(10) NULL,
-    [TAD] NVARCHAR(255) NULL, 
-    [CDC] NVARCHAR(255) NULL, 
-	[Tel] NVARCHAR(255) NULL,
-	[Fax] NVARCHAR(255) NULL,
-	[Email] NVARCHAR(255) NULL,
-    CONSTRAINT [FK_Colleges_TypesCollege] FOREIGN KEY ([TypeCollege_Id]) REFERENCES [TypesCollege]([Id]), 
-    CONSTRAINT [FK_Colleges_Territoires] FOREIGN KEY ([Territoire_Id]) REFERENCES [Territoires]([Id]),
-    CONSTRAINT [FK_Annees_Colleges] FOREIGN KEY ([Annee_Id]) REFERENCES [Annees]([Id])
-)

+ 0 - 33
CD67.FicheCollege.BDD/Identites.sql

@@ -1,33 +0,0 @@
-CREATE TABLE [dbo].[Identites]
-(
-	[College_Id] INT NOT NULL PRIMARY KEY, 
-	[Principal_SID] NVARCHAR(64) NULL, 
-	[Principal_Login] NVARCHAR(255) NULL, 
-    [Principal_Nom] NVARCHAR(255) NULL, 
-    [Principal_Prenom] NVARCHAR(255) NULL, 
-    [Principal_Email] NVARCHAR(255) NULL, 
-    [Principal_Tel] NVARCHAR(255) NULL,
-	[Principal_Structure] NVARCHAR(255) NULL,
-	[Adjoint_SID] NVARCHAR(64) NULL, 
-	[Adjoint_Login] NVARCHAR(255) NULL, 
-	[Adjoint_Nom] NVARCHAR(255) NULL, 
-    [Adjoint_Prenom] NVARCHAR(255) NULL, 
-    [Adjoint_Email] NVARCHAR(255) NULL, 
-    [Adjoint_Tel] NVARCHAR(255) NULL,
-	[Adjoint_Structure] NVARCHAR(255) NULL,
-	[Gestionnaire_SID] NVARCHAR(64) NULL, 
-	[Gestionnaire_Login] NVARCHAR(255) NULL, 
-	[Gestionnaire_Nom] NVARCHAR(255) NULL, 
-    [Gestionnaire_Prenom] NVARCHAR(255) NULL, 
-    [Gestionnaire_Email] NVARCHAR(255) NULL, 
-    [Gestionnaire_Tel] NVARCHAR(255) NULL,
-	[Gestionnaire_Structure] NVARCHAR(255) NULL,
-	[Gestionnaire2_SID] NVARCHAR(64) NULL, 
-	[Gestionnaire2_Login] NVARCHAR(255) NULL, 
-	[Gestionnaire2_Nom] NVARCHAR(255) NULL, 
-    [Gestionnaire2_Prenom] NVARCHAR(255) NULL, 
-    [Gestionnaire2_Email] NVARCHAR(255) NULL, 
-    [Gestionnaire2_Tel] NVARCHAR(255) NULL,
-	[Gestionnaire2_Structure] NVARCHAR(255) NULL, 
-    CONSTRAINT [FK_FicheIdentite_College] FOREIGN KEY ([College_Id]) REFERENCES [Colleges]([Id])
-)

+ 0 - 12
CD67.FicheCollege.BDD/Territoires.sql

@@ -1,12 +0,0 @@
-CREATE TABLE [dbo].[Territoires]
-(
-	[Id] NVARCHAR(10) NOT NULL PRIMARY KEY, 
-    [Libelle] NVARCHAR(255) NOT NULL, 
-    [Referent_SID] NVARCHAR(64) NULL, 
-    [Referent_Nom] NVARCHAR(255) NULL, 
-    [Referent_Prenom] NVARCHAR(255) NULL, 
-    [Referent_Structure] NVARCHAR(255) NULL, 
-    [Referent_Login] NVARCHAR(255) NULL, 
-	[Referent_Email] NVARCHAR(255) NULL, 
-    [Ordre] INT NOT NULL
-)

+ 0 - 6
CD67.FicheCollege.BDD/TypesCollege.sql

@@ -1,6 +0,0 @@
-CREATE TABLE [dbo].[TypesCollege]
-(
-	[Id] INT NOT NULL PRIMARY KEY IDENTITY, 
-    [Libelle] NVARCHAR(255) NOT NULL, 
-    [Ordre] INT NOT NULL
-)

+ 8 - 0
CD67.FicheCollege.BDD/dbo/Tables/ActionAxes.sql

@@ -0,0 +1,8 @@
+CREATE TABLE [dbo].[ActionAxes] (
+    [Id]         INT            IDENTITY (1, 1) NOT NULL,
+    [Nom]        NVARCHAR (MAX) NOT NULL,
+    [Neutralise] BIT            NOT NULL,
+    [Ordre]      INT            NOT NULL,
+    CONSTRAINT [PK_ActionAxes] PRIMARY KEY CLUSTERED ([Id] ASC)
+);
+

+ 15 - 0
CD67.FicheCollege.BDD/dbo/Tables/ActionThematiques.sql

@@ -0,0 +1,15 @@
+CREATE TABLE [dbo].[ActionThematiques] (
+    [Id]          INT            IDENTITY (1, 1) NOT NULL,
+    [Nom]         NVARCHAR (MAX) NOT NULL,
+    [Neutralise]  BIT            NOT NULL,
+    [Ordre]       INT            NOT NULL,
+    [ActionAxeId] INT            NOT NULL,
+    CONSTRAINT [PK_ActionThematiques] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionAxeActionThematique] FOREIGN KEY ([ActionAxeId]) REFERENCES [dbo].[ActionAxes] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionAxeActionThematique]
+    ON [dbo].[ActionThematiques]([ActionAxeId] ASC);
+

+ 16 - 0
CD67.FicheCollege.BDD/dbo/Tables/Actions.sql

@@ -0,0 +1,16 @@
+CREATE TABLE [dbo].[Actions] (
+    [Id]                 INT            IDENTITY (1, 1) NOT NULL,
+    [Nom]                NVARCHAR (MAX) NOT NULL,
+    [Description]        NVARCHAR (MAX) NOT NULL,
+    [Neutralise]         BIT            NOT NULL,
+    [Ordre]              INT            NOT NULL,
+    [ActionThematiqueId] INT            NOT NULL,
+    CONSTRAINT [PK_Actions] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionThematiqueAction] FOREIGN KEY ([ActionThematiqueId]) REFERENCES [dbo].[ActionThematiques] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionThematiqueAction]
+    ON [dbo].[Actions]([ActionThematiqueId] ASC);
+

+ 6 - 0
CD67.FicheCollege.BDD/dbo/Tables/Annees.sql

@@ -0,0 +1,6 @@
+CREATE TABLE [dbo].[Annees] (
+    [Id]      INT           IDENTITY (1, 1) NOT NULL,
+    [Libelle] NVARCHAR (12) NOT NULL,
+    CONSTRAINT [PK_Annees] PRIMARY KEY CLUSTERED ([Id] ASC)
+);
+

+ 38 - 0
CD67.FicheCollege.BDD/dbo/Tables/Colleges.sql

@@ -0,0 +1,38 @@
+CREATE TABLE [dbo].[Colleges] (
+    [Id]             INT            NOT NULL,
+    [Annee_Id]       INT            NOT NULL,
+    [CodeRne]        NVARCHAR (10)  NOT NULL,
+    [Libelle]        NVARCHAR (255) NOT NULL,
+    [Adresse]        NVARCHAR (255) NULL,
+    [Code_Postal]    NVARCHAR (5)   NULL,
+    [TypeCollege_Id] INT            NOT NULL,
+    [Commune_Insee]  NVARCHAR (5)   NULL,
+    [Commune]        NVARCHAR (255) NOT NULL,
+    [Canton]         NVARCHAR (255) NULL,
+    [Territoire_Id]  NVARCHAR (10)  NULL,
+    [TAD]            NVARCHAR (255) NULL,
+    [CDC]            NVARCHAR (255) NULL,
+    [Tel]            NVARCHAR (255) NULL,
+    [Fax]            NVARCHAR (255) NULL,
+    [Email]          NVARCHAR (255) NULL,
+    CONSTRAINT [PK_Colleges] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_AnneeCollege] FOREIGN KEY ([Annee_Id]) REFERENCES [dbo].[Annees] ([Id]),
+    CONSTRAINT [FK_Colleges_Territoires] FOREIGN KEY ([Territoire_Id]) REFERENCES [dbo].[Territoires] ([Id]),
+    CONSTRAINT [FK_Colleges_TypesCollege] FOREIGN KEY ([TypeCollege_Id]) REFERENCES [dbo].[TypesCollege] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_Colleges_Territoires]
+    ON [dbo].[Colleges]([Territoire_Id] ASC);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_Colleges_TypesCollege]
+    ON [dbo].[Colleges]([TypeCollege_Id] ASC);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_AnneeCollege]
+    ON [dbo].[Colleges]([Annee_Id] ASC);
+

+ 34 - 0
CD67.FicheCollege.BDD/dbo/Tables/Identites.sql

@@ -0,0 +1,34 @@
+CREATE TABLE [dbo].[Identites] (
+    [College_Id]              INT            NOT NULL,
+    [Principal_SID]           NVARCHAR (64)  NULL,
+    [Principal_Login]         NVARCHAR (255) NULL,
+    [Principal_Nom]           NVARCHAR (255) NULL,
+    [Principal_Prenom]        NVARCHAR (255) NULL,
+    [Principal_Email]         NVARCHAR (255) NULL,
+    [Principal_Tel]           NVARCHAR (255) NULL,
+    [Principal_Structure]     NVARCHAR (255) NULL,
+    [Adjoint_SID]             NVARCHAR (64)  NULL,
+    [Adjoint_Login]           NVARCHAR (255) NULL,
+    [Adjoint_Nom]             NVARCHAR (255) NULL,
+    [Adjoint_Prenom]          NVARCHAR (255) NULL,
+    [Adjoint_Email]           NVARCHAR (255) NULL,
+    [Adjoint_Tel]             NVARCHAR (255) NULL,
+    [Adjoint_Structure]       NVARCHAR (255) NULL,
+    [Gestionnaire_SID]        NVARCHAR (64)  NULL,
+    [Gestionnaire_Login]      NVARCHAR (255) NULL,
+    [Gestionnaire_Nom]        NVARCHAR (255) NULL,
+    [Gestionnaire_Prenom]     NVARCHAR (255) NULL,
+    [Gestionnaire_Email]      NVARCHAR (255) NULL,
+    [Gestionnaire_Tel]        NVARCHAR (255) NULL,
+    [Gestionnaire_Structure]  NVARCHAR (255) NULL,
+    [Gestionnaire2_SID]       NVARCHAR (64)  NULL,
+    [Gestionnaire2_Login]     NVARCHAR (255) NULL,
+    [Gestionnaire2_Nom]       NVARCHAR (255) NULL,
+    [Gestionnaire2_Prenom]    NVARCHAR (255) NULL,
+    [Gestionnaire2_Email]     NVARCHAR (255) NULL,
+    [Gestionnaire2_Tel]       NVARCHAR (255) NULL,
+    [Gestionnaire2_Structure] NVARCHAR (255) NULL,
+    CONSTRAINT [PK_Identites] PRIMARY KEY CLUSTERED ([College_Id] ASC),
+    CONSTRAINT [FK_FicheIdentite_College] FOREIGN KEY ([College_Id]) REFERENCES [dbo].[Colleges] ([Id])
+);
+

+ 13 - 0
CD67.FicheCollege.BDD/dbo/Tables/Territoires.sql

@@ -0,0 +1,13 @@
+CREATE TABLE [dbo].[Territoires] (
+    [Id]                 NVARCHAR (10)  NOT NULL,
+    [Libelle]            NVARCHAR (255) NOT NULL,
+    [Referent_SID]       NVARCHAR (64)  NULL,
+    [Referent_Nom]       NVARCHAR (255) NULL,
+    [Referent_Prenom]    NVARCHAR (255) NULL,
+    [Referent_Structure] NVARCHAR (255) NULL,
+    [Referent_Login]     NVARCHAR (255) NULL,
+    [Referent_Email]     NVARCHAR (255) NULL,
+    [Ordre]              INT            NOT NULL,
+    CONSTRAINT [PK_Territoires] PRIMARY KEY CLUSTERED ([Id] ASC)
+);
+

+ 7 - 0
CD67.FicheCollege.BDD/dbo/Tables/TypesCollege.sql

@@ -0,0 +1,7 @@
+CREATE TABLE [dbo].[TypesCollege] (
+    [Id]      INT            IDENTITY (1, 1) NOT NULL,
+    [Libelle] NVARCHAR (255) NOT NULL,
+    [Ordre]   INT            NOT NULL,
+    CONSTRAINT [PK_TypesCollege] PRIMARY KEY CLUSTERED ([Id] ASC)
+);
+

+ 26 - 0
CD67.FicheCollege.Entity/Action.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré à partir d'un modèle.
+//
+//     Des modifications manuelles apportées à ce fichier peuvent conduire à un comportement inattendu de votre application.
+//     Les modifications manuelles apportées à ce fichier sont remplacées si le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace CD67.FicheCollege.Entity
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Action
+    {
+        public int Id { get; set; }
+        public string Nom { get; set; }
+        public string Description { get; set; }
+        public bool Neutralise { get; set; }
+        public int Ordre { get; set; }
+        public int ActionThematiqueId { get; set; }
+    
+        public virtual ActionThematique ActionThematique { get; set; }
+    }
+}

+ 32 - 0
CD67.FicheCollege.Entity/ActionAxe.cs

@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré à partir d'un modèle.
+//
+//     Des modifications manuelles apportées à ce fichier peuvent conduire à un comportement inattendu de votre application.
+//     Les modifications manuelles apportées à ce fichier sont remplacées si le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace CD67.FicheCollege.Entity
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class ActionAxe
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public ActionAxe()
+        {
+            this.Neutralise = false;
+            this.ActionThematiques = new HashSet<ActionThematique>();
+        }
+    
+        public int Id { get; set; }
+        public string Nom { get; set; }
+        public bool Neutralise { get; set; }
+        public int Ordre { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionThematique> ActionThematiques { get; set; }
+    }
+}

+ 34 - 0
CD67.FicheCollege.Entity/ActionThematique.cs

@@ -0,0 +1,34 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré à partir d'un modèle.
+//
+//     Des modifications manuelles apportées à ce fichier peuvent conduire à un comportement inattendu de votre application.
+//     Les modifications manuelles apportées à ce fichier sont remplacées si le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace CD67.FicheCollege.Entity
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class ActionThematique
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public ActionThematique()
+        {
+            this.Neutralise = false;
+            this.Actions = new HashSet<Action>();
+        }
+    
+        public int Id { get; set; }
+        public string Nom { get; set; }
+        public bool Neutralise { get; set; }
+        public int Ordre { get; set; }
+        public int ActionAxeId { get; set; }
+    
+        public virtual ActionAxe ActionAxe { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Action> Actions { get; set; }
+    }
+}

+ 12 - 0
CD67.FicheCollege.Entity/CD67.FicheCollege.Entity.csproj

@@ -59,6 +59,15 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Action.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="ActionAxe.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="ActionThematique.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
     <Compile Include="Annee.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
@@ -84,6 +93,9 @@
     <Compile Include="Extend\College.cs" />
     <Compile Include="Extend\Territoire.cs" />
     <Compile Include="Extend\Identite.cs" />
+    <Compile Include="Extend\ActionAxe.cs" />
+    <Compile Include="Extend\ActionThematique.cs" />
+    <Compile Include="Extend\Action.cs" />
     <Compile Include="Extend\TypeCollege.cs" />
     <Compile Include="Identite.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>

+ 3 - 0
CD67.FicheCollege.Entity/EntityModel.Context.cs

@@ -30,5 +30,8 @@ namespace CD67.FicheCollege.Entity
         public virtual DbSet<College> Colleges { get; set; }
         public virtual DbSet<Identite> Identites { get; set; }
         public virtual DbSet<Annee> Annees { get; set; }
+        public virtual DbSet<ActionAxe> ActionAxes { get; set; }
+        public virtual DbSet<ActionThematique> ActionThematiques { get; set; }
+        public virtual DbSet<Action> Actions { get; set; }
     }
 }

+ 327 - 160
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -4,163 +4,228 @@
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-    <Schema Namespace="CD67.FicheCollege.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
-        <EntityType Name="Annees">
-          <Key>
-            <PropertyRef Name="Id" />
-          </Key>
-          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Libelle" Type="nvarchar" MaxLength="12" Nullable="false" />
-        </EntityType>
-        <EntityType Name="Colleges">
-          <Key>
-            <PropertyRef Name="Id" />
-          </Key>
-          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Annee_Id" Type="int" Nullable="false" />
-          <Property Name="CodeRne" Type="nvarchar" MaxLength="10" Nullable="false" />
-          <Property Name="Libelle" Type="nvarchar" MaxLength="255" Nullable="false" />
-          <Property Name="Adresse" Type="nvarchar" MaxLength="255" />
-          <Property Name="Code_Postal" Type="nvarchar" MaxLength="5" />
-          <Property Name="TypeCollege_Id" Type="int" Nullable="false" />
-          <Property Name="Commune_Insee" Type="nvarchar" MaxLength="5" />
-          <Property Name="Commune" Type="nvarchar" MaxLength="255" Nullable="false" />
-          <Property Name="Canton" Type="nvarchar" MaxLength="255" />
-          <Property Name="Territoire_Id" Type="nvarchar" MaxLength="10" />
-          <Property Name="TAD" Type="nvarchar" MaxLength="255" />
-          <Property Name="CDC" Type="nvarchar" MaxLength="255" />
-          <Property Name="Tel" Type="nvarchar" MaxLength="255" />
-          <Property Name="Fax" Type="nvarchar" MaxLength="255" />
-          <Property Name="Email" Type="nvarchar" MaxLength="255" />
-        </EntityType>
-        <EntityType Name="Identites">
-          <Key>
-            <PropertyRef Name="College_Id" />
-          </Key>
-          <Property Name="College_Id" Type="int" Nullable="false" />
-          <Property Name="Principal_SID" Type="nvarchar" MaxLength="64" />
-          <Property Name="Principal_Login" Type="nvarchar" MaxLength="255" />
-          <Property Name="Principal_Nom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Principal_Prenom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Principal_Email" Type="nvarchar" MaxLength="255" />
-          <Property Name="Principal_Tel" Type="nvarchar" MaxLength="255" />
-          <Property Name="Principal_Structure" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_SID" Type="nvarchar" MaxLength="64" />
-          <Property Name="Adjoint_Login" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_Nom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_Prenom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_Email" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_Tel" Type="nvarchar" MaxLength="255" />
-          <Property Name="Adjoint_Structure" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_SID" Type="nvarchar" MaxLength="64" />
-          <Property Name="Gestionnaire_Login" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_Nom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_Prenom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_Email" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_Tel" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire_Structure" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_SID" Type="nvarchar" MaxLength="64" />
-          <Property Name="Gestionnaire2_Login" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_Nom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_Prenom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_Email" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_Tel" Type="nvarchar" MaxLength="255" />
-          <Property Name="Gestionnaire2_Structure" Type="nvarchar" MaxLength="255" />
-        </EntityType>
-        <EntityType Name="Territoires">
-          <Key>
-            <PropertyRef Name="Id" />
-          </Key>
-          <Property Name="Id" Type="nvarchar" MaxLength="10" Nullable="false" />
-          <Property Name="Libelle" Type="nvarchar" MaxLength="255" Nullable="false" />
-          <Property Name="Referent_SID" Type="nvarchar" MaxLength="64" />
-          <Property Name="Referent_Nom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Referent_Prenom" Type="nvarchar" MaxLength="255" />
-          <Property Name="Referent_Structure" Type="nvarchar" MaxLength="255" />
-          <Property Name="Referent_Login" Type="nvarchar" MaxLength="255" />
-          <Property Name="Referent_Email" Type="nvarchar" MaxLength="255" />
-          <Property Name="Ordre" Type="int" Nullable="false" />
-        </EntityType>
-        <EntityType Name="TypesCollege">
-          <Key>
-            <PropertyRef Name="Id" />
-          </Key>
-          <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Libelle" Type="nvarchar" MaxLength="255" Nullable="false" />
-          <Property Name="Ordre" Type="int" Nullable="false" />
-        </EntityType>
-        <Association Name="FK_Annees_Colleges">
-          <End Role="Annees" Type="Self.Annees" Multiplicity="1" />
-          <End Role="Colleges" Type="Self.Colleges" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="Annees">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Colleges">
-              <PropertyRef Name="Annee_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
-        <Association Name="FK_Colleges_Territoires">
-          <End Role="Territoires" Type="Self.Territoires" Multiplicity="0..1" />
-          <End Role="Colleges" Type="Self.Colleges" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="Territoires">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Colleges">
-              <PropertyRef Name="Territoire_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
-        <Association Name="FK_Colleges_TypesCollege">
-          <End Role="TypesCollege" Type="Self.TypesCollege" Multiplicity="1" />
-          <End Role="Colleges" Type="Self.Colleges" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="TypesCollege">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Colleges">
-              <PropertyRef Name="TypeCollege_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
-        <Association Name="FK_FicheIdentite_College">
-          <End Role="Colleges" Type="Self.Colleges" Multiplicity="1" />
-          <End Role="Identites" Type="Self.Identites" Multiplicity="0..1" />
-          <ReferentialConstraint>
-            <Principal Role="Colleges">
-              <PropertyRef Name="Id" />
-            </Principal>
-            <Dependent Role="Identites">
-              <PropertyRef Name="College_Id" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
-        <EntityContainer Name="CD67FicheCollegeStoreContainer">
-          <EntitySet Name="Annees" EntityType="Self.Annees" Schema="dbo" store:Type="Tables" />
-          <EntitySet Name="Colleges" EntityType="Self.Colleges" Schema="dbo" store:Type="Tables" />
-          <EntitySet Name="Identites" EntityType="Self.Identites" Schema="dbo" store:Type="Tables" />
-          <EntitySet Name="Territoires" EntityType="Self.Territoires" Schema="dbo" store:Type="Tables" />
-          <EntitySet Name="TypesCollege" EntityType="Self.TypesCollege" Schema="dbo" store:Type="Tables" />
-          <AssociationSet Name="FK_Annees_Colleges" Association="Self.FK_Annees_Colleges">
-            <End Role="Annees" EntitySet="Annees" />
-            <End Role="Colleges" EntitySet="Colleges" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Colleges_Territoires" Association="Self.FK_Colleges_Territoires">
-            <End Role="Territoires" EntitySet="Territoires" />
-            <End Role="Colleges" EntitySet="Colleges" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Colleges_TypesCollege" Association="Self.FK_Colleges_TypesCollege">
-            <End Role="TypesCollege" EntitySet="TypesCollege" />
-            <End Role="Colleges" EntitySet="Colleges" />
-          </AssociationSet>
-          <AssociationSet Name="FK_FicheIdentite_College" Association="Self.FK_FicheIdentite_College">
-            <End Role="Colleges" EntitySet="Colleges" />
-            <End Role="Identites" EntitySet="Identites" />
-          </AssociationSet>
-        </EntityContainer>
-      </Schema></edmx:StorageModels>
+    <Schema Namespace="CD67.FicheCollege.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2012" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+  <EntityContainer Name="CD67FicheCollegeStoreContainer">
+    <EntitySet Name="TypesCollege" EntityType="CD67.FicheCollege.Store.TypesCollege" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="Territoires" EntityType="CD67.FicheCollege.Store.Territoires" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="Colleges" EntityType="CD67.FicheCollege.Store.Colleges" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="Identites" EntityType="CD67.FicheCollege.Store.Identites" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="Annees" EntityType="CD67.FicheCollege.Store.Annees" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionAxes" EntityType="CD67.FicheCollege.Store.ActionAxes" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionThematiques" EntityType="CD67.FicheCollege.Store.ActionThematiques" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="Actions" EntityType="CD67.FicheCollege.Store.Actions" store:Type="Tables" Schema="dbo" />
+    <AssociationSet Name="FK_Colleges_Territoires" Association="CD67.FicheCollege.Store.FK_Colleges_Territoires">
+      <End Role="Territoire" EntitySet="Territoires" />
+      <End Role="College" EntitySet="Colleges" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Colleges_TypesCollege" Association="CD67.FicheCollege.Store.FK_Colleges_TypesCollege">
+      <End Role="TypeCollege" EntitySet="TypesCollege" />
+      <End Role="College" EntitySet="Colleges" />
+    </AssociationSet>
+    <AssociationSet Name="FK_FicheIdentite_College" Association="CD67.FicheCollege.Store.FK_FicheIdentite_College">
+      <End Role="College" EntitySet="Colleges" />
+      <End Role="Identite" EntitySet="Identites" />
+    </AssociationSet>
+    <AssociationSet Name="AnneeCollege" Association="CD67.FicheCollege.Store.AnneeCollege">
+      <End Role="Annee" EntitySet="Annees" />
+      <End Role="College" EntitySet="Colleges" />
+    </AssociationSet>
+    <AssociationSet Name="ActionAxeActionThematique" Association="CD67.FicheCollege.Store.ActionAxeActionThematique">
+      <End Role="ActionAxe" EntitySet="ActionAxes" />
+      <End Role="ActionThematique" EntitySet="ActionThematiques" />
+    </AssociationSet>
+    <AssociationSet Name="ActionThematiqueAction" Association="CD67.FicheCollege.Store.ActionThematiqueAction">
+      <End Role="ActionThematique" EntitySet="ActionThematiques" />
+      <End Role="Action" EntitySet="Actions" />
+    </AssociationSet>
+  </EntityContainer>
+  <EntityType Name="TypesCollege">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Libelle" Type="nvarchar" Nullable="false" MaxLength="255" />
+    <Property Name="Ordre" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Territoires">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="nvarchar" Nullable="false" MaxLength="10" />
+    <Property Name="Libelle" Type="nvarchar" Nullable="false" MaxLength="255" />
+    <Property Name="Referent_SID" Type="nvarchar" Nullable="true" MaxLength="64" />
+    <Property Name="Referent_Nom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Referent_Prenom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Referent_Structure" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Referent_Login" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Referent_Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Ordre" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Colleges">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" Nullable="false" />
+    <Property Name="Annee_Id" Type="int" Nullable="false" />
+    <Property Name="CodeRne" Type="nvarchar" Nullable="false" MaxLength="10" />
+    <Property Name="Libelle" Type="nvarchar" Nullable="false" MaxLength="255" />
+    <Property Name="Adresse" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Code_Postal" Type="nvarchar" Nullable="true" MaxLength="5" />
+    <Property Name="TypeCollege_Id" Type="int" Nullable="false" />
+    <Property Name="Commune_Insee" Type="nvarchar" Nullable="true" MaxLength="5" />
+    <Property Name="Commune" Type="nvarchar" Nullable="false" MaxLength="255" />
+    <Property Name="Canton" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Territoire_Id" Type="nvarchar" Nullable="true" MaxLength="10" />
+    <Property Name="TAD" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="CDC" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Tel" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Fax" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+  </EntityType>
+  <EntityType Name="Identites">
+    <Key>
+      <PropertyRef Name="College_Id" />
+    </Key>
+    <Property Name="College_Id" Type="int" Nullable="false" />
+    <Property Name="Principal_SID" Type="nvarchar" Nullable="true" MaxLength="64" />
+    <Property Name="Principal_Login" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Principal_Nom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Principal_Prenom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Principal_Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Principal_Tel" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Principal_Structure" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_SID" Type="nvarchar" Nullable="true" MaxLength="64" />
+    <Property Name="Adjoint_Login" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_Nom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_Prenom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_Tel" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Adjoint_Structure" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_SID" Type="nvarchar" Nullable="true" MaxLength="64" />
+    <Property Name="Gestionnaire_Login" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_Nom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_Prenom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_Tel" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire_Structure" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_SID" Type="nvarchar" Nullable="true" MaxLength="64" />
+    <Property Name="Gestionnaire2_Login" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_Nom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_Prenom" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_Email" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_Tel" Type="nvarchar" Nullable="true" MaxLength="255" />
+    <Property Name="Gestionnaire2_Structure" Type="nvarchar" Nullable="true" MaxLength="255" />
+  </EntityType>
+  <EntityType Name="Annees">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Libelle" Type="nvarchar" Nullable="false" MaxLength="12" />
+  </EntityType>
+  <EntityType Name="ActionAxes">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Neutralise" Type="bit" Nullable="false" DefaultValue="false" />
+    <Property Name="Ordre" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="ActionThematiques">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Neutralise" Type="bit" Nullable="false" DefaultValue="false" />
+    <Property Name="Ordre" Type="int" Nullable="false" />
+    <Property Name="ActionAxeId" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Actions">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Description" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Neutralise" Type="bit" Nullable="false" />
+    <Property Name="Ordre" Type="int" Nullable="false" />
+    <Property Name="ActionThematiqueId" Type="int" Nullable="false" />
+  </EntityType>
+  <Association Name="FK_Colleges_Territoires">
+    <End Role="Territoire" Type="CD67.FicheCollege.Store.Territoires" Multiplicity="0..1" />
+    <End Role="College" Type="CD67.FicheCollege.Store.Colleges" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Territoire">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="College">
+        <PropertyRef Name="Territoire_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Colleges_TypesCollege">
+    <End Role="TypeCollege" Type="CD67.FicheCollege.Store.TypesCollege" Multiplicity="1" />
+    <End Role="College" Type="CD67.FicheCollege.Store.Colleges" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="TypeCollege">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="College">
+        <PropertyRef Name="TypeCollege_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_FicheIdentite_College">
+    <End Role="College" Type="CD67.FicheCollege.Store.Colleges" Multiplicity="1" />
+    <End Role="Identite" Type="CD67.FicheCollege.Store.Identites" Multiplicity="0..1" />
+    <ReferentialConstraint>
+      <Principal Role="College">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Identite">
+        <PropertyRef Name="College_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="AnneeCollege">
+    <End Role="Annee" Type="CD67.FicheCollege.Store.Annees" Multiplicity="1" />
+    <End Role="College" Type="CD67.FicheCollege.Store.Colleges" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Annee">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="College">
+        <PropertyRef Name="Annee_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="ActionAxeActionThematique">
+    <End Role="ActionAxe" Type="CD67.FicheCollege.Store.ActionAxes" Multiplicity="1" />
+    <End Role="ActionThematique" Type="CD67.FicheCollege.Store.ActionThematiques" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="ActionAxe">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ActionThematique">
+        <PropertyRef Name="ActionAxeId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="ActionThematiqueAction">
+    <End Role="ActionThematique" Type="CD67.FicheCollege.Store.ActionThematiques" Multiplicity="1" />
+    <End Role="Action" Type="CD67.FicheCollege.Store.Actions" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="ActionThematique">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="Action">
+        <PropertyRef Name="ActionThematiqueId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+</Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="CD67.FicheCollege" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
@@ -186,6 +251,17 @@
             <End Role="Annee" EntitySet="Annees" />
             <End Role="College" EntitySet="Colleges" />
           </AssociationSet>
+          <EntitySet Name="ActionAxes" EntityType="CD67.FicheCollege.ActionAxe" />
+          <EntitySet Name="ActionThematiques" EntityType="CD67.FicheCollege.ActionThematique" />
+          <EntitySet Name="Actions" EntityType="CD67.FicheCollege.Action" />
+          <AssociationSet Name="ActionAxeActionThematique" Association="CD67.FicheCollege.ActionAxeActionThematique">
+            <End Role="ActionAxe" EntitySet="ActionAxes" />
+            <End Role="ActionThematique" EntitySet="ActionThematiques" />
+          </AssociationSet>
+          <AssociationSet Name="ActionThematiqueAction" Association="CD67.FicheCollege.ActionThematiqueAction">
+            <End Role="ActionThematique" EntitySet="ActionThematiques" />
+            <End Role="Action" EntitySet="Actions" />
+          </AssociationSet>
           </EntityContainer>
         <EntityType Name="TypeCollege">
           <Key>
@@ -327,6 +403,64 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <EntityType Name="ActionAxe">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Nom" Type="String" Nullable="false" />
+          <Property Name="Neutralise" Type="Boolean" Nullable="false" DefaultValue="False" />
+          <Property Name="Ordre" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionThematiques" Relationship="CD67.FicheCollege.ActionAxeActionThematique" FromRole="ActionAxe" ToRole="ActionThematique" />
+        </EntityType>
+        <EntityType Name="ActionThematique">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Nom" Type="String" Nullable="false" />
+          <Property Name="Neutralise" Type="Boolean" Nullable="false" DefaultValue="False" />
+          <Property Name="Ordre" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionAxe" Relationship="CD67.FicheCollege.ActionAxeActionThematique" FromRole="ActionThematique" ToRole="ActionAxe" />
+          <Property Name="ActionAxeId" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Actions" Relationship="CD67.FicheCollege.ActionThematiqueAction" FromRole="ActionThematique" ToRole="Action" />
+        </EntityType>
+        <EntityType Name="Action">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Nom" Type="String" Nullable="false" />
+          <Property Name="Description" Type="String" Nullable="false" MaxLength="Max" />
+          <Property Name="Neutralise" Type="Boolean" Nullable="false" />
+          <Property Name="Ordre" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionThematique" Relationship="CD67.FicheCollege.ActionThematiqueAction" FromRole="Action" ToRole="ActionThematique" />
+          <Property Name="ActionThematiqueId" Type="Int32" Nullable="false" />
+        </EntityType>
+        <Association Name="ActionAxeActionThematique">
+          <End Type="CD67.FicheCollege.ActionAxe" Role="ActionAxe" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.ActionThematique" Role="ActionThematique" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionAxe">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="ActionThematique">
+              <PropertyRef Name="ActionAxeId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="ActionThematiqueAction">
+          <End Type="CD67.FicheCollege.ActionThematique" Role="ActionThematique" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.Action" Role="Action" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionThematique">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="Action">
+              <PropertyRef Name="ActionThematiqueId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -360,8 +494,9 @@
     <EntitySetMapping Name="Colleges">
       <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.College)">
         <MappingFragment StoreEntitySet="Colleges">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="Annee_Id" ColumnName="Annee_Id" />
           <ScalarProperty Name="CodeRne" ColumnName="CodeRne" />
-                <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Libelle" ColumnName="Libelle" />
           <ScalarProperty Name="Adresse" ColumnName="Adresse" />
           <ScalarProperty Name="Code_Postal" ColumnName="Code_Postal" />
@@ -375,7 +510,6 @@
           <ScalarProperty Name="Tel" ColumnName="Tel" />
           <ScalarProperty Name="Fax" ColumnName="Fax" />
           <ScalarProperty Name="Email" ColumnName="Email" />
-          <ScalarProperty Name="Annee_Id" ColumnName="Annee_Id" />
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
@@ -417,8 +551,41 @@
     <EntitySetMapping Name="Annees">
       <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.Annee)">
         <MappingFragment StoreEntitySet="Annees">
+          <ScalarProperty Name="Id" ColumnName="Id" />
           <ScalarProperty Name="Libelle" ColumnName="Libelle" />
-                <ScalarProperty Name="Id" ColumnName="Id" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="ActionAxes">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionAxe)">
+        <MappingFragment StoreEntitySet="ActionAxes">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="Nom" ColumnName="Nom" />
+          <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
+          <ScalarProperty Name="Ordre" ColumnName="Ordre" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="ActionThematiques">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionThematique)">
+        <MappingFragment StoreEntitySet="ActionThematiques">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="Nom" ColumnName="Nom" />
+          <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
+          <ScalarProperty Name="Ordre" ColumnName="Ordre" />
+          <ScalarProperty Name="ActionAxeId" ColumnName="ActionAxeId" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Actions">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.Action)">
+        <MappingFragment StoreEntitySet="Actions">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="Nom" ColumnName="Nom" />
+          <ScalarProperty Name="Description" ColumnName="Description" />
+          <ScalarProperty Name="Neutralise" ColumnName="Neutralise" />
+          <ScalarProperty Name="Ordre" ColumnName="Ordre" />
+          <ScalarProperty Name="ActionThematiqueId" ColumnName="ActionThematiqueId" />
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>

+ 6 - 1
CD67.FicheCollege.Entity/EntityModel.edmx.diagram

@@ -10,10 +10,15 @@
         <EntityTypeShape EntityType="CD67.FicheCollege.College" Width="1.75" PointX="3" PointY="2.625" />
         <AssociationConnector Association="CD67.FicheCollege.FK_Colleges_Territoires" />
         <AssociationConnector Association="CD67.FicheCollege.FK_Colleges_TypesCollege" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.Identite" Width="1.875" PointX="5.5" PointY="3.875" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.Identite" Width="1.875" PointX="2.875" PointY="8" />
         <AssociationConnector Association="CD67.FicheCollege.FK_FicheIdentite_College" />
         <EntityTypeShape EntityType="CD67.FicheCollege.Annee" Width="1.5" PointX="3" PointY="0.5" />
         <AssociationConnector Association="CD67.FicheCollege.AnneeCollege" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionAxe" Width="1.5" PointX="11.125" PointY="3.125" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionThematique" Width="1.875" PointX="8.375" PointY="3.25" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.Action" Width="1.5" PointX="5.875" PointY="3.25" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionAxeActionThematique" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionThematiqueAction" />
         </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 109 - 32
CD67.FicheCollege.Entity/EntityModel.edmx.sql

@@ -2,7 +2,7 @@
 -- --------------------------------------------------
 -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
 -- --------------------------------------------------
--- Date Created: 02/01/2018 10:35:41
+-- Date Created: 02/28/2018 15:05:10
 -- Generated from EDMX file: C:\dev\dotnet\FicheCollege\CD67.FicheCollege.Entity\EntityModel.edmx
 -- --------------------------------------------------
 
@@ -26,22 +26,43 @@ GO
 IF OBJECT_ID(N'[dbo].[FK_FicheIdentite_College]', 'F') IS NOT NULL
     ALTER TABLE [dbo].[Identites] DROP CONSTRAINT [FK_FicheIdentite_College];
 GO
+IF OBJECT_ID(N'[dbo].[FK_AnneeCollege]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Colleges] DROP CONSTRAINT [FK_AnneeCollege];
+GO
+IF OBJECT_ID(N'[dbo].[FK_AxeThematique]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Thematiques] DROP CONSTRAINT [FK_AxeThematique];
+GO
+IF OBJECT_ID(N'[dbo].[FK_ThematiqueAction]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Actions] DROP CONSTRAINT [FK_ThematiqueAction];
+GO
 
 -- --------------------------------------------------
 -- Dropping existing tables
 -- --------------------------------------------------
 
+IF OBJECT_ID(N'[dbo].[TypesCollege]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[TypesCollege];
+GO
+IF OBJECT_ID(N'[dbo].[Territoires]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Territoires];
+GO
 IF OBJECT_ID(N'[dbo].[Colleges]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Colleges];
 GO
 IF OBJECT_ID(N'[dbo].[Identites]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Identites];
 GO
-IF OBJECT_ID(N'[dbo].[Territoires]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[Territoires];
+IF OBJECT_ID(N'[dbo].[Annees]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Annees];
 GO
-IF OBJECT_ID(N'[dbo].[TypesCollege]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[TypesCollege];
+IF OBJECT_ID(N'[dbo].[Axes]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Axes];
+GO
+IF OBJECT_ID(N'[dbo].[Thematiques]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Thematiques];
+GO
+IF OBJECT_ID(N'[dbo].[Actions]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Actions];
 GO
 
 -- --------------------------------------------------
@@ -72,7 +93,9 @@ GO
 
 -- Creating table 'Colleges'
 CREATE TABLE [dbo].[Colleges] (
-    [Id] nvarchar(8)  NOT NULL,
+    [Id] int  NOT NULL,
+    [Annee_Id] int  NOT NULL,
+    [CodeRne] nvarchar(10)  NOT NULL,
     [Libelle] nvarchar(255)  NOT NULL,
     [Adresse] nvarchar(255)  NULL,
     [Code_Postal] nvarchar(5)  NULL,
@@ -85,14 +108,13 @@ CREATE TABLE [dbo].[Colleges] (
     [CDC] nvarchar(255)  NULL,
     [Tel] nvarchar(255)  NULL,
     [Fax] nvarchar(255)  NULL,
-    [Email] nvarchar(255)  NULL,
-    [Annee_Id] int  NOT NULL
+    [Email] nvarchar(255)  NULL
 );
 GO
 
 -- Creating table 'Identites'
 CREATE TABLE [dbo].[Identites] (
-    [College_Id] nvarchar(8)  NOT NULL,
+    [College_Id] int  NOT NULL,
     [Principal_SID] nvarchar(64)  NULL,
     [Principal_Login] nvarchar(255)  NULL,
     [Principal_Nom] nvarchar(255)  NULL,
@@ -124,18 +146,40 @@ CREATE TABLE [dbo].[Identites] (
 );
 GO
 
--- Creating table 'ActionsCLAS'
-CREATE TABLE [dbo].[ActionsCLAS] (
-    [College_Id] nvarchar(8)  NOT NULL,
-    [Action] bit  NULL,
-    [Commentaire] nvarchar(max)  NULL
+-- Creating table 'Annees'
+CREATE TABLE [dbo].[Annees] (
+    [Id] int IDENTITY(1,1) NOT NULL,
+    [Libelle] nvarchar(12)  NOT NULL
 );
 GO
 
--- Creating table 'Annees'
-CREATE TABLE [dbo].[Annees] (
+-- Creating table 'ActionAxes'
+CREATE TABLE [dbo].[ActionAxes] (
     [Id] int IDENTITY(1,1) NOT NULL,
-    [libelle] nvarchar(max)  NOT NULL
+    [Nom] nvarchar(max)  NOT NULL,
+    [Neutralise] bit  NOT NULL,
+    [Ordre] int  NOT NULL
+);
+GO
+
+-- Creating table 'ActionThematiques'
+CREATE TABLE [dbo].[ActionThematiques] (
+    [Id] int IDENTITY(1,1) NOT NULL,
+    [Nom] nvarchar(max)  NOT NULL,
+    [Neutralise] bit  NOT NULL,
+    [Ordre] int  NOT NULL,
+    [ActionAxeId] int  NOT NULL
+);
+GO
+
+-- Creating table 'Actions'
+CREATE TABLE [dbo].[Actions] (
+    [Id] int IDENTITY(1,1) NOT NULL,
+    [Nom] nvarchar(max)  NOT NULL,
+    [Description] nvarchar(max)  NOT NULL,
+    [Neutralise] bit  NOT NULL,
+    [Ordre] int  NOT NULL,
+    [ActionThematiqueId] int  NOT NULL
 );
 GO
 
@@ -167,18 +211,30 @@ ADD CONSTRAINT [PK_Identites]
     PRIMARY KEY CLUSTERED ([College_Id] ASC);
 GO
 
--- Creating primary key on [College_Id] in table 'ActionsCLAS'
-ALTER TABLE [dbo].[ActionsCLAS]
-ADD CONSTRAINT [PK_ActionsCLAS]
-    PRIMARY KEY CLUSTERED ([College_Id] ASC);
-GO
-
 -- Creating primary key on [Id] in table 'Annees'
 ALTER TABLE [dbo].[Annees]
 ADD CONSTRAINT [PK_Annees]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
+-- Creating primary key on [Id] in table 'ActionAxes'
+ALTER TABLE [dbo].[ActionAxes]
+ADD CONSTRAINT [PK_ActionAxes]
+    PRIMARY KEY CLUSTERED ([Id] ASC);
+GO
+
+-- Creating primary key on [Id] in table 'ActionThematiques'
+ALTER TABLE [dbo].[ActionThematiques]
+ADD CONSTRAINT [PK_ActionThematiques]
+    PRIMARY KEY CLUSTERED ([Id] ASC);
+GO
+
+-- Creating primary key on [Id] in table 'Actions'
+ALTER TABLE [dbo].[Actions]
+ADD CONSTRAINT [PK_Actions]
+    PRIMARY KEY CLUSTERED ([Id] ASC);
+GO
+
 -- --------------------------------------------------
 -- Creating all FOREIGN KEY constraints
 -- --------------------------------------------------
@@ -222,15 +278,6 @@ ADD CONSTRAINT [FK_FicheIdentite_College]
     ON DELETE NO ACTION ON UPDATE NO ACTION;
 GO
 
--- Creating foreign key on [College_Id] in table 'ActionsCLAS'
-ALTER TABLE [dbo].[ActionsCLAS]
-ADD CONSTRAINT [FK_Actions_CLAS_College]
-    FOREIGN KEY ([College_Id])
-    REFERENCES [dbo].[Colleges]
-        ([Id])
-    ON DELETE NO ACTION ON UPDATE NO ACTION;
-GO
-
 -- Creating foreign key on [Annee_Id] in table 'Colleges'
 ALTER TABLE [dbo].[Colleges]
 ADD CONSTRAINT [FK_AnneeCollege]
@@ -246,6 +293,36 @@ ON [dbo].[Colleges]
     ([Annee_Id]);
 GO
 
+-- Creating foreign key on [ActionAxeId] in table 'ActionThematiques'
+ALTER TABLE [dbo].[ActionThematiques]
+ADD CONSTRAINT [FK_ActionAxeActionThematique]
+    FOREIGN KEY ([ActionAxeId])
+    REFERENCES [dbo].[ActionAxes]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionAxeActionThematique'
+CREATE INDEX [IX_FK_ActionAxeActionThematique]
+ON [dbo].[ActionThematiques]
+    ([ActionAxeId]);
+GO
+
+-- Creating foreign key on [ActionThematiqueId] in table 'Actions'
+ALTER TABLE [dbo].[Actions]
+ADD CONSTRAINT [FK_ActionThematiqueAction]
+    FOREIGN KEY ([ActionThematiqueId])
+    REFERENCES [dbo].[ActionThematiques]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionThematiqueAction'
+CREATE INDEX [IX_FK_ActionThematiqueAction]
+ON [dbo].[Actions]
+    ([ActionThematiqueId]);
+GO
+
 -- --------------------------------------------------
 -- Script has ended
 -- --------------------------------------------------

+ 38 - 0
CD67.FicheCollege.Entity/Extend/Action.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CD67.FicheCollege.Entity
+{
+    /// <summary>
+    /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
+    /// </summary>
+    [MetadataType(typeof(Action_Metadata))]
+    public partial class Action
+    {
+    }
+
+    /// <summary>
+    /// Classe contenant les DataAnnotations pour chaque champ
+    /// </summary>
+    public class Action_Metadata
+    {
+        [Required(ErrorMessage = "Obligatoire")]
+        public int Id { get; set; }
+
+        [Required(ErrorMessage = "Obligatoire")]
+        [Display(Name = "Action")]
+        public string Nom { get; set; }
+
+        [Display(Name = "Description")]
+        public string Description { get; set; }
+
+        [Display(Name = "Neutralisé (oui/non)")]
+        public bool Neutralise { get; set; }
+
+        public int Ordre { get; set; }
+    }
+}

+ 35 - 0
CD67.FicheCollege.Entity/Extend/ActionAxe.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CD67.FicheCollege.Entity
+{
+    /// <summary>
+    /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
+    /// </summary>
+    [MetadataType(typeof(ActionAxe_Metadata))]
+    public partial class ActionAxe
+    {
+    }
+
+    /// <summary>
+    /// Classe contenant les DataAnnotations pour chaque champ
+    /// </summary>
+    public class ActionAxe_Metadata
+    {
+        [Required(ErrorMessage = "Obligatoire")]
+        public int Id { get; set; }
+
+        [Required(ErrorMessage = "Obligatoire")]
+        [Display(Name = "Action")]
+        public string Nom { get; set; }
+
+        [Display(Name = "Neutralisé (oui/non)")]
+        public bool Neutralise { get; set; }
+
+        public int Ordre { get; set; }
+    }
+}

+ 35 - 0
CD67.FicheCollege.Entity/Extend/ActionThematique.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CD67.FicheCollege.Entity
+{
+    /// <summary>
+    /// Classe d'extension de celle d'Entity, nécessaire pour y associer les Metadata
+    /// </summary>
+    [MetadataType(typeof(ActionThematique_Metadata))]
+    public partial class ActionThematique
+    {
+    }
+
+    /// <summary>
+    /// Classe contenant les DataAnnotations pour chaque champ
+    /// </summary>
+    public class ActionThematique_Metadata
+    {
+        [Required(ErrorMessage = "Obligatoire")]
+        public int Id { get; set; }
+
+        [Required(ErrorMessage = "Obligatoire")]
+        [Display(Name = "Action")]
+        public string Nom { get; set; }
+
+        [Display(Name = "Neutralisé (oui/non)")]
+        public bool Neutralise { get; set; }
+
+        public int Ordre { get; set; }
+    }
+}

+ 9 - 0
CD67.FicheCollege.Factory/CD67.FicheCollege.Factory.csproj

@@ -57,6 +57,15 @@
     <Compile Include="AnneeFactory.cs" />
     <Compile Include="CollegeFactory.cs" />
     <Compile Include="IdentiteFactory.cs" />
+    <Compile Include="Internal\ActionAxeFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Internal\ActionFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Internal\ActionThematiqueFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
     <Compile Include="Internal\AnneeFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>

+ 21 - 0
CD67.FicheCollege.Factory/Internal/ActionAxeFactory.cs

@@ -0,0 +1,21 @@
+using CD67.FicheCollege.Entity;
+using System.Linq;
+
+namespace CD67.FicheCollege.Factory
+{
+	/// <summary>
+    /// NE PAS MODIFIER
+    /// C'est une classe partielle, elle peut être complétée avec une classe partielle du même nom
+    /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
+    /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
+    /// </summary>
+	public partial class ActionAxeFactory : Internal.BaseFactory<Entity.ActionAxe>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionAxeFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+	

+ 21 - 0
CD67.FicheCollege.Factory/Internal/ActionFactory.cs

@@ -0,0 +1,21 @@
+using CD67.FicheCollege.Entity;
+using System.Linq;
+
+namespace CD67.FicheCollege.Factory
+{
+	/// <summary>
+    /// NE PAS MODIFIER
+    /// C'est une classe partielle, elle peut être complétée avec une classe partielle du même nom
+    /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
+    /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
+    /// </summary>
+	public partial class ActionFactory : Internal.BaseFactory<Entity.Action>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+	

+ 21 - 0
CD67.FicheCollege.Factory/Internal/ActionThematiqueFactory.cs

@@ -0,0 +1,21 @@
+using CD67.FicheCollege.Entity;
+using System.Linq;
+
+namespace CD67.FicheCollege.Factory
+{
+	/// <summary>
+    /// NE PAS MODIFIER
+    /// C'est une classe partielle, elle peut être complétée avec une classe partielle du même nom
+    /// Factory générée automatiquement à l'aide du fichier GenericFactories.tt
+    /// pour toutes les entités du fichier entity : /CD67.FicheCollege.Entity/EntityModel.edmx
+    /// </summary>
+	public partial class ActionThematiqueFactory : Internal.BaseFactory<Entity.ActionThematique>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionThematiqueFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+	

+ 1 - 1
CD67.FicheCollege.MVC/Views/Admin/Index.cshtml

@@ -6,7 +6,7 @@
 
 <h2>Listes de choix</h2>
 
-<h4>Chapitre 1</h4>
 <hr />
+
 @Html.ActionLink("Administration des types de collège", "Index", "TypeCollege")<br />
 @Html.ActionLink("Administration des territoires", "Index", "Territoire")<br />

+ 5 - 1
CD67.FicheCollege.MVC/Views/Annees/Details.cshtml

@@ -10,4 +10,8 @@
 
 <h1>Accueil @(Model.Obj.Libelle)</h1>
 
-@Html.ActionLink("Les collèges", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)<br />
+<ul>
+    <li>@Html.ActionLink("Les collèges", "Index", "Colleges", new { annee_id = Model.Obj.Id }, null)</li>
+    <li>@Html.ActionLink("Les actions", "Index", "Actions", new { annee_id = Model.Obj.Id }, null)</li>
+    <li>@Html.ActionLink("Administration", "Index", "Admin", new { annee_id = Model.Obj.Id }, null)</li>
+</ul>

+ 1 - 1
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -119,7 +119,7 @@
         </div>
 
         <!-- Menu de niveau 2 -->
-        @if (@Model.ModeAcces != ModeAcces.Creation & (Model.Obj is College | Model.Obj is Identite))
+        @if (@Model.Acces != ModeAcces.Creation & (Model.Obj is College | Model.Obj is Identite))
         {
             <div>
                 <ul id="menu-l2">