Browse Source

CHG Mise à jour du MCD

olivier.massot 7 năm trước cách đây
mục cha
commit
1d94198d99

+ 8 - 0
CD67.FicheCollege.BDD/CD67.FicheCollege.BDD.sqlproj

@@ -62,6 +62,7 @@
     <Folder Include="Properties" />
     <Folder Include="dbo\" />
     <Folder Include="dbo\Tables\" />
+    <Folder Include="Security\" />
   </ItemGroup>
   <ItemGroup>
     <Build Include="dbo\Tables\TypesCollege.sql" />
@@ -72,5 +73,12 @@
     <Build Include="dbo\Tables\ActionEduAxes.sql" />
     <Build Include="dbo\Tables\ActionEduThematiques.sql" />
     <Build Include="dbo\Tables\ActionsEdu.sql" />
+    <Build Include="dbo\Tables\ActionsEduColleges.sql" />
+    <Build Include="dbo\Tables\ActionEduMissions.sql" />
+    <Build Include="Security\FicheCollege_Admin.sql" />
+    <Build Include="Security\FicheCollege_Admin_1.sql" />
+    <Build Include="Security\FicheCollege_UserRO.sql" />
+    <Build Include="Security\FicheCollege_UserRW.sql" />
+    <Build Include="Security\RoleMemberships.sql" />
   </ItemGroup>
 </Project>

+ 2 - 0
CD67.FicheCollege.BDD/Security/FicheCollege_Admin.sql

@@ -0,0 +1,2 @@
+CREATE USER [FicheCollege_Admin] FOR LOGIN [FicheCollege_Admin];
+

+ 3 - 0
CD67.FicheCollege.BDD/Security/FicheCollege_Admin_1.sql

@@ -0,0 +1,3 @@
+CREATE LOGIN [FicheCollege_Admin]
+    WITH PASSWORD = N'Iuhhzqgqx:nlfvfw^lhKgtzemsFT7_&#$!~<vtjth:zui,;a', SID = 0x1929F35F0DA6274882652B14192B475D, DEFAULT_LANGUAGE = [us_english], CHECK_POLICY = OFF;
+

+ 2 - 0
CD67.FicheCollege.BDD/Security/FicheCollege_UserRO.sql

@@ -0,0 +1,2 @@
+CREATE USER [FicheCollege_UserRO] FOR LOGIN [FicheCollege_UserRO];
+

+ 2 - 0
CD67.FicheCollege.BDD/Security/FicheCollege_UserRW.sql

@@ -0,0 +1,2 @@
+CREATE USER [FicheCollege_UserRW] FOR LOGIN [FicheCollege_UserRW];
+

+ 14 - 0
CD67.FicheCollege.BDD/Security/RoleMemberships.sql

@@ -0,0 +1,14 @@
+ALTER ROLE [db_owner] ADD MEMBER [FicheCollege_Admin];
+
+
+GO
+ALTER ROLE [db_datareader] ADD MEMBER [FicheCollege_UserRO];
+
+
+GO
+ALTER ROLE [db_datareader] ADD MEMBER [FicheCollege_UserRW];
+
+
+GO
+ALTER ROLE [db_datawriter] ADD MEMBER [FicheCollege_UserRW];
+

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

@@ -0,0 +1,15 @@
+CREATE TABLE [dbo].[ActionEduMissions] (
+    [Id]                 INT            IDENTITY (1, 1) NOT NULL,
+    [Code]               NVARCHAR (MAX) NOT NULL,
+    [Nom]                NVARCHAR (MAX) NOT NULL,
+    [Description]        NVARCHAR (MAX) NOT NULL,
+    [ActionEduCollegeId] INT            NOT NULL,
+    CONSTRAINT [PK_ActionEduMissions] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionEduCollegeActionEduMission] FOREIGN KEY ([ActionEduCollegeId]) REFERENCES [dbo].[ActionsEduColleges] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduCollegeActionEduMission]
+    ON [dbo].[ActionEduMissions]([ActionEduCollegeId] ASC);
+

+ 1 - 1
CD67.FicheCollege.BDD/dbo/Tables/ActionsEdu.sql

@@ -1,6 +1,6 @@
 CREATE TABLE [dbo].[ActionsEdu] (
     [Id]                    INT            IDENTITY (1, 1) NOT NULL,
-    [Numero] INT NOT NULL, 
+    [Numero]                NVARCHAR (MAX) NOT NULL,
     [Nom]                   NVARCHAR (MAX) NOT NULL,
     [Description]           NVARCHAR (MAX) NOT NULL,
     [Neutralise]            BIT            NOT NULL,

+ 27 - 0
CD67.FicheCollege.BDD/dbo/Tables/ActionsEduColleges.sql

@@ -0,0 +1,27 @@
+CREATE TABLE [dbo].[ActionsEduColleges] (
+    [Id]                     INT            IDENTITY (1, 1) NOT NULL,
+    [CommentaireInterne]     NVARCHAR (MAX) NOT NULL,
+    [CommentaoirePublic]     NVARCHAR (MAX) NOT NULL,
+    [NbEleves]               NVARCHAR (MAX) NOT NULL,
+    [Montant]                NVARCHAR (MAX) NOT NULL,
+    [TiersAstre_Code]        NVARCHAR (MAX) NOT NULL,
+    [TiersAstre_Nom]         NVARCHAR (MAX) NOT NULL,
+    [TiersAstre_CodeFamille] NVARCHAR (MAX) NOT NULL,
+    [TiersAstre_Description] NVARCHAR (MAX) NOT NULL,
+    [College_Id]             INT            NOT NULL,
+    [ActionEdu_Id]           INT            NOT NULL,
+    CONSTRAINT [PK_ActionsEduColleges] PRIMARY KEY CLUSTERED ([Id] ASC),
+    CONSTRAINT [FK_ActionEduCollegeActionEdu] FOREIGN KEY ([ActionEdu_Id]) REFERENCES [dbo].[ActionsEdu] ([Id]),
+    CONSTRAINT [FK_ActionEduCollegeCollege] FOREIGN KEY ([College_Id]) REFERENCES [dbo].[Colleges] ([Id])
+);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduCollegeCollege]
+    ON [dbo].[ActionsEduColleges]([College_Id] ASC);
+
+
+GO
+CREATE NONCLUSTERED INDEX [IX_FK_ActionEduCollegeActionEdu]
+    ON [dbo].[ActionsEduColleges]([ActionEdu_Id] ASC);
+

+ 3 - 0
CD67.FicheCollege.Entity/ActionEdu.cs

@@ -18,6 +18,7 @@ namespace CD67.FicheCollege.Entity
         public ActionEdu()
         {
             this.Numero = "0";
+            this.ActionsEduColleges = new HashSet<ActionEduCollege>();
         }
     
         public int Id { get; set; }
@@ -31,5 +32,7 @@ namespace CD67.FicheCollege.Entity
     
         public virtual ActionEduThematique ActionEduThematique { get; set; }
         public virtual Annee Annee { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionEduCollege> ActionsEduColleges { get; set; }
     }
 }

+ 38 - 0
CD67.FicheCollege.Entity/ActionEduCollege.cs

@@ -0,0 +1,38 @@
+//------------------------------------------------------------------------------
+// <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 ActionEduCollege
+    {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public ActionEduCollege()
+        {
+            this.ActionEduMissions = new HashSet<ActionEduMission>();
+        }
+    
+        public int Id { get; set; }
+        public string CommentaireInterne { get; set; }
+        public string CommentaoirePublic { get; set; }
+        public string NbEleves { get; set; }
+        public string Montant { get; set; }
+        public string TiersAstre_Code { get; set; }
+        public string TiersAstre_Nom { get; set; }
+        public string TiersAstre_CodeFamille { get; set; }
+        public string TiersAstre_Description { get; set; }
+    
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionEduMission> ActionEduMissions { get; set; }
+        public virtual College College { get; set; }
+        public virtual ActionEdu ActionEdu { get; set; }
+    }
+}

+ 25 - 0
CD67.FicheCollege.Entity/ActionEduMission.cs

@@ -0,0 +1,25 @@
+//------------------------------------------------------------------------------
+// <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 ActionEduMission
+    {
+        public int Id { get; set; }
+        public string Code { get; set; }
+        public string Nom { get; set; }
+        public string Description { get; set; }
+        public int ActionEduCollegeId { get; set; }
+    
+        public virtual ActionEduCollege ActionEduCollege { get; set; }
+    }
+}

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

@@ -65,6 +65,12 @@
     <Compile Include="ActionEduAxe.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>
+    <Compile Include="ActionEduCollege.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
+    <Compile Include="ActionEduMission.cs">
+      <DependentUpon>EntityModel.tt</DependentUpon>
+    </Compile>
     <Compile Include="ActionEduThematique.cs">
       <DependentUpon>EntityModel.tt</DependentUpon>
     </Compile>

+ 8 - 0
CD67.FicheCollege.Entity/College.cs

@@ -14,6 +14,12 @@ namespace CD67.FicheCollege.Entity
     
     public partial class College
     {
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+        public College()
+        {
+            this.ActionsEduColleges = new HashSet<ActionEduCollege>();
+        }
+    
         public int Id { get; set; }
         public int Annee_Id { get; set; }
         public string CodeRne { get; set; }
@@ -35,5 +41,7 @@ namespace CD67.FicheCollege.Entity
         public virtual TypeCollege TypeCollege { get; set; }
         public virtual Identite Identite { get; set; }
         public virtual Annee Annee { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<ActionEduCollege> ActionsEduColleges { get; set; }
     }
 }

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

@@ -33,5 +33,7 @@ namespace CD67.FicheCollege.Entity
         public virtual DbSet<ActionEduAxe> ActionEduAxes { get; set; }
         public virtual DbSet<ActionEduThematique> ActionEduThematiques { get; set; }
         public virtual DbSet<ActionEdu> ActionsEdu { get; set; }
+        public virtual DbSet<ActionEduCollege> ActionsEduColleges { get; set; }
+        public virtual DbSet<ActionEduMission> ActionEduMissions { get; set; }
     }
 }

+ 182 - 0
CD67.FicheCollege.Entity/EntityModel.edmx

@@ -14,6 +14,8 @@
     <EntitySet Name="ActionEduAxes" EntityType="CD67.FicheCollege.Store.ActionEduAxes" store:Type="Tables" Schema="dbo" />
     <EntitySet Name="ActionEduThematiques" EntityType="CD67.FicheCollege.Store.ActionEduThematiques" store:Type="Tables" Schema="dbo" />
     <EntitySet Name="ActionsEdu" EntityType="CD67.FicheCollege.Store.ActionsEdu" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionsEduColleges" EntityType="CD67.FicheCollege.Store.ActionsEduColleges" store:Type="Tables" Schema="dbo" />
+    <EntitySet Name="ActionEduMissions" EntityType="CD67.FicheCollege.Store.ActionEduMissions" 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" />
@@ -42,6 +44,18 @@
       <End Role="ActionEdu" EntitySet="ActionsEdu" />
       <End Role="Annee" EntitySet="Annees" />
     </AssociationSet>
+    <AssociationSet Name="ActionEduCollegeActionEduMission" Association="CD67.FicheCollege.Store.ActionEduCollegeActionEduMission">
+      <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+      <End Role="ActionEduMission" EntitySet="ActionEduMissions" />
+    </AssociationSet>
+    <AssociationSet Name="ActionEduCollegeCollege" Association="CD67.FicheCollege.Store.ActionEduCollegeCollege">
+      <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+      <End Role="College" EntitySet="Colleges" />
+    </AssociationSet>
+    <AssociationSet Name="ActionEduCollegeActionEdu" Association="CD67.FicheCollege.Store.ActionEduCollegeActionEdu">
+      <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+      <End Role="ActionEdu" EntitySet="ActionsEdu" />
+    </AssociationSet>
   </EntityContainer>
   <EntityType Name="TypesCollege">
     <Key>
@@ -159,6 +173,32 @@
     <Property Name="ActionEduThematiqueId" Type="int" Nullable="false" />
     <Property Name="AnneeId" Type="int" Nullable="false" />
   </EntityType>
+  <EntityType Name="ActionsEduColleges">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="CommentaireInterne" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="CommentaoirePublic" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="NbEleves" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Montant" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="TiersAstre_Code" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="TiersAstre_Nom" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="TiersAstre_CodeFamille" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="TiersAstre_Description" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="College_Id" Type="int" Nullable="false" />
+    <Property Name="ActionEdu_Id" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="ActionEduMissions">
+    <Key>
+      <PropertyRef Name="Id" />
+    </Key>
+    <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Code" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Nom" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="Description" Type="nvarchar(max)" Nullable="false" />
+    <Property Name="ActionEduCollegeId" 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="*" />
@@ -243,6 +283,42 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="ActionEduCollegeActionEduMission">
+    <End Role="ActionEduCollege" Type="CD67.FicheCollege.Store.ActionsEduColleges" Multiplicity="1" />
+    <End Role="ActionEduMission" Type="CD67.FicheCollege.Store.ActionEduMissions" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="ActionEduCollege">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ActionEduMission">
+        <PropertyRef Name="ActionEduCollegeId" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="ActionEduCollegeCollege">
+    <End Role="ActionEduCollege" Type="CD67.FicheCollege.Store.ActionsEduColleges" Multiplicity="*" />
+    <End Role="College" Type="CD67.FicheCollege.Store.Colleges" Multiplicity="1" />
+    <ReferentialConstraint>
+      <Principal Role="College">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ActionEduCollege">
+        <PropertyRef Name="College_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="ActionEduCollegeActionEdu">
+    <End Role="ActionEduCollege" Type="CD67.FicheCollege.Store.ActionsEduColleges" Multiplicity="*" />
+    <End Role="ActionEdu" Type="CD67.FicheCollege.Store.ActionsEdu" Multiplicity="1" />
+    <ReferentialConstraint>
+      <Principal Role="ActionEdu">
+        <PropertyRef Name="Id" />
+      </Principal>
+      <Dependent Role="ActionEduCollege">
+        <PropertyRef Name="ActionEdu_Id" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
 </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
@@ -284,6 +360,20 @@
             <End Role="ActionEdu" EntitySet="ActionsEdu" />
             <End Role="Annee" EntitySet="Annees" />
           </AssociationSet>
+          <EntitySet Name="ActionsEduColleges" EntityType="CD67.FicheCollege.ActionEduCollege" />
+          <EntitySet Name="ActionEduMissions" EntityType="CD67.FicheCollege.ActionEduMission" />
+          <AssociationSet Name="ActionEduCollegeActionEduMission" Association="CD67.FicheCollege.ActionEduCollegeActionEduMission">
+            <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+            <End Role="ActionEduMission" EntitySet="ActionEduMissions" />
+          </AssociationSet>
+          <AssociationSet Name="ActionEduCollegeCollege" Association="CD67.FicheCollege.ActionEduCollegeCollege">
+            <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+            <End Role="College" EntitySet="Colleges" />
+          </AssociationSet>
+          <AssociationSet Name="ActionEduCollegeActionEdu" Association="CD67.FicheCollege.ActionEduCollegeActionEdu">
+            <End Role="ActionEduCollege" EntitySet="ActionsEduColleges" />
+            <End Role="ActionEdu" EntitySet="ActionsEdu" />
+          </AssociationSet>
           </EntityContainer>
         <EntityType Name="TypeCollege">
           <Key>
@@ -333,6 +423,7 @@
           <NavigationProperty Name="TypeCollege" Relationship="CD67.FicheCollege.FK_Colleges_TypesCollege" FromRole="College" ToRole="TypeCollege" />
           <NavigationProperty Name="Identite" Relationship="CD67.FicheCollege.FK_FicheIdentite_College" FromRole="College" ToRole="Identite" />
           <NavigationProperty Name="Annee" Relationship="CD67.FicheCollege.AnneeCollege" FromRole="College" ToRole="Annee" />
+          <NavigationProperty Name="ActionsEduColleges" Relationship="CD67.FicheCollege.ActionEduCollegeCollege" FromRole="College" ToRole="ActionEduCollege" />
         </EntityType>
         <Association Name="FK_Colleges_Territoires">
           <End Type="CD67.FicheCollege.Territoire" Role="Territoire" Multiplicity="0..1" />
@@ -462,6 +553,7 @@
           <Property Name="ActionEduThematiqueId" Type="Int32" Nullable="false" />
           <NavigationProperty Name="Annee" Relationship="CD67.FicheCollege.ActionEduAnnee" FromRole="ActionEdu" ToRole="Annee" />
           <Property Name="AnneeId" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="ActionsEduColleges" Relationship="CD67.FicheCollege.ActionEduCollegeActionEdu" FromRole="ActionEdu" ToRole="ActionEduCollege" />
         </EntityType>
         <Association Name="ActionEduAxeActionEduThematique">
           <End Type="CD67.FicheCollege.ActionEduAxe" Role="ActionEduAxe" Multiplicity="1" />
@@ -499,6 +591,54 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <EntityType Name="ActionEduCollege">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="CommentaireInterne" Type="String" Nullable="false" />
+          <Property Name="CommentaoirePublic" Type="String" Nullable="false" />
+          <Property Name="NbEleves" Type="String" Nullable="false" />
+          <Property Name="Montant" Type="String" Nullable="false" />
+          <Property Name="TiersAstre_Code" Type="String" Nullable="false" />
+          <Property Name="TiersAstre_Nom" Type="String" Nullable="false" />
+          <Property Name="TiersAstre_CodeFamille" Type="String" Nullable="false" />
+          <Property Name="TiersAstre_Description" Type="String" Nullable="false" />
+          <NavigationProperty Name="ActionEduMissions" Relationship="CD67.FicheCollege.ActionEduCollegeActionEduMission" FromRole="ActionEduCollege" ToRole="ActionEduMission" />
+          <NavigationProperty Name="College" Relationship="CD67.FicheCollege.ActionEduCollegeCollege" FromRole="ActionEduCollege" ToRole="College" />
+          <NavigationProperty Name="ActionEdu" Relationship="CD67.FicheCollege.ActionEduCollegeActionEdu" FromRole="ActionEduCollege" ToRole="ActionEdu" />
+        </EntityType>
+        <EntityType Name="ActionEduMission">
+          <Key>
+            <PropertyRef Name="Id" />
+          </Key>
+          <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="Code" Type="String" Nullable="false" />
+          <Property Name="Nom" Type="String" Nullable="false" />
+          <Property Name="Description" Type="String" Nullable="false" />
+          <NavigationProperty Name="ActionEduCollege" Relationship="CD67.FicheCollege.ActionEduCollegeActionEduMission" FromRole="ActionEduMission" ToRole="ActionEduCollege" />
+          <Property Name="ActionEduCollegeId" Type="Int32" Nullable="false" />
+        </EntityType>
+        <Association Name="ActionEduCollegeActionEduMission">
+          <End Type="CD67.FicheCollege.ActionEduCollege" Role="ActionEduCollege" Multiplicity="1" />
+          <End Type="CD67.FicheCollege.ActionEduMission" Role="ActionEduMission" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="ActionEduCollege">
+              <PropertyRef Name="Id" />
+            </Principal>
+            <Dependent Role="ActionEduMission">
+              <PropertyRef Name="ActionEduCollegeId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="ActionEduCollegeCollege">
+          <End Type="CD67.FicheCollege.ActionEduCollege" Role="ActionEduCollege" Multiplicity="*" />
+          <End Type="CD67.FicheCollege.College" Role="College" Multiplicity="1" />
+        </Association>
+        <Association Name="ActionEduCollegeActionEdu">
+          <End Type="CD67.FicheCollege.ActionEduCollege" Role="ActionEduCollege" Multiplicity="*" />
+          <End Type="CD67.FicheCollege.ActionEdu" Role="ActionEdu" Multiplicity="1" />
+        </Association>
         </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -629,6 +769,48 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
+    <EntitySetMapping Name="ActionsEduColleges">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionEduCollege)">
+        <MappingFragment StoreEntitySet="ActionsEduColleges">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="CommentaireInterne" ColumnName="CommentaireInterne" />
+          <ScalarProperty Name="CommentaoirePublic" ColumnName="CommentaoirePublic" />
+          <ScalarProperty Name="NbEleves" ColumnName="NbEleves" />
+          <ScalarProperty Name="Montant" ColumnName="Montant" />
+          <ScalarProperty Name="TiersAstre_Code" ColumnName="TiersAstre_Code" />
+          <ScalarProperty Name="TiersAstre_Nom" ColumnName="TiersAstre_Nom" />
+          <ScalarProperty Name="TiersAstre_CodeFamille" ColumnName="TiersAstre_CodeFamille" />
+          <ScalarProperty Name="TiersAstre_Description" ColumnName="TiersAstre_Description" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="ActionEduMissions">
+      <EntityTypeMapping TypeName="IsTypeOf(CD67.FicheCollege.ActionEduMission)">
+        <MappingFragment StoreEntitySet="ActionEduMissions">
+          <ScalarProperty Name="Id" ColumnName="Id" />
+          <ScalarProperty Name="Code" ColumnName="Code" />
+          <ScalarProperty Name="Nom" ColumnName="Nom" />
+          <ScalarProperty Name="Description" ColumnName="Description" />
+          <ScalarProperty Name="ActionEduCollegeId" ColumnName="ActionEduCollegeId" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <AssociationSetMapping Name="ActionEduCollegeCollege" TypeName="CD67.FicheCollege.ActionEduCollegeCollege" StoreEntitySet="ActionsEduColleges">
+      <EndProperty Name="College">
+        <ScalarProperty Name="Id" ColumnName="College_Id" />
+      </EndProperty>
+      <EndProperty Name="ActionEduCollege">
+        <ScalarProperty Name="Id" ColumnName="Id" />
+      </EndProperty>
+    </AssociationSetMapping>
+    <AssociationSetMapping Name="ActionEduCollegeActionEdu" TypeName="CD67.FicheCollege.ActionEduCollegeActionEdu" StoreEntitySet="ActionsEduColleges">
+      <EndProperty Name="ActionEdu">
+        <ScalarProperty Name="Id" ColumnName="ActionEdu_Id" />
+      </EndProperty>
+      <EndProperty Name="ActionEduCollege">
+        <ScalarProperty Name="Id" ColumnName="Id" />
+      </EndProperty>
+    </AssociationSetMapping>
   </EntityContainerMapping>
 </Mapping></edmx:Mappings>
   </edmx:Runtime>

+ 8 - 3
CD67.FicheCollege.Entity/EntityModel.edmx.diagram

@@ -14,12 +14,17 @@
         <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.ActionEduAxe" Width="1.5" PointX="11.125" PointY="3.125" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduThematique" Width="1.875" PointX="8.875" PointY="3.25" />
-        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEdu" Width="1.5" PointX="6.875" PointY="3.25" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduAxe" Width="1.5" PointX="12.125" PointY="3.125" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduThematique" Width="1.875" PointX="9.875" PointY="3.125" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEdu" Width="1.5" PointX="8" PointY="3.125" />
         <AssociationConnector Association="CD67.FicheCollege.ActionEduAxeActionEduThematique" />
         <AssociationConnector Association="CD67.FicheCollege.ActionEduThematiqueActionEdu" />
         <AssociationConnector Association="CD67.FicheCollege.ActionEduAnnee" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduCollege" Width="2.125" PointX="5.25" PointY="3" />
+        <EntityTypeShape EntityType="CD67.FicheCollege.ActionEduMission" Width="1.5" PointX="6" PointY="6.875" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduCollegeActionEduMission" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduCollegeCollege" />
+        <AssociationConnector Association="CD67.FicheCollege.ActionEduCollegeActionEdu" />
         </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 84 - 1
CD67.FicheCollege.Entity/EntityModel.edmx.sql

@@ -2,7 +2,7 @@
 -- --------------------------------------------------
 -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
 -- --------------------------------------------------
--- Date Created: 03/01/2018 14:38:50
+-- Date Created: 03/01/2018 16:53:49
 -- Generated from EDMX file: C:\dev\dotnet\FicheCollege\CD67.FicheCollege.Entity\EntityModel.edmx
 -- --------------------------------------------------
 
@@ -188,6 +188,32 @@ CREATE TABLE [dbo].[ActionsEdu] (
 );
 GO
 
+-- Creating table 'ActionsEduColleges'
+CREATE TABLE [dbo].[ActionsEduColleges] (
+    [Id] int IDENTITY(1,1) NOT NULL,
+    [CommentaireInterne] nvarchar(max)  NOT NULL,
+    [CommentaoirePublic] nvarchar(max)  NOT NULL,
+    [NbEleves] nvarchar(max)  NOT NULL,
+    [Montant] nvarchar(max)  NOT NULL,
+    [TiersAstre_Code] nvarchar(max)  NOT NULL,
+    [TiersAstre_Nom] nvarchar(max)  NOT NULL,
+    [TiersAstre_CodeFamille] nvarchar(max)  NOT NULL,
+    [TiersAstre_Description] nvarchar(max)  NOT NULL,
+    [College_Id] int  NOT NULL,
+    [ActionEdu_Id] int  NOT NULL
+);
+GO
+
+-- Creating table 'ActionEduMissions'
+CREATE TABLE [dbo].[ActionEduMissions] (
+    [Id] int IDENTITY(1,1) NOT NULL,
+    [Code] nvarchar(max)  NOT NULL,
+    [Nom] nvarchar(max)  NOT NULL,
+    [Description] nvarchar(max)  NOT NULL,
+    [ActionEduCollegeId] int  NOT NULL
+);
+GO
+
 -- --------------------------------------------------
 -- Creating all PRIMARY KEY constraints
 -- --------------------------------------------------
@@ -240,6 +266,18 @@ ADD CONSTRAINT [PK_ActionsEdu]
     PRIMARY KEY CLUSTERED ([Id] ASC);
 GO
 
+-- Creating primary key on [Id] in table 'ActionsEduColleges'
+ALTER TABLE [dbo].[ActionsEduColleges]
+ADD CONSTRAINT [PK_ActionsEduColleges]
+    PRIMARY KEY CLUSTERED ([Id] ASC);
+GO
+
+-- Creating primary key on [Id] in table 'ActionEduMissions'
+ALTER TABLE [dbo].[ActionEduMissions]
+ADD CONSTRAINT [PK_ActionEduMissions]
+    PRIMARY KEY CLUSTERED ([Id] ASC);
+GO
+
 -- --------------------------------------------------
 -- Creating all FOREIGN KEY constraints
 -- --------------------------------------------------
@@ -343,6 +381,51 @@ ON [dbo].[ActionsEdu]
     ([AnneeId]);
 GO
 
+-- Creating foreign key on [ActionEduCollegeId] in table 'ActionEduMissions'
+ALTER TABLE [dbo].[ActionEduMissions]
+ADD CONSTRAINT [FK_ActionEduCollegeActionEduMission]
+    FOREIGN KEY ([ActionEduCollegeId])
+    REFERENCES [dbo].[ActionsEduColleges]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduCollegeActionEduMission'
+CREATE INDEX [IX_FK_ActionEduCollegeActionEduMission]
+ON [dbo].[ActionEduMissions]
+    ([ActionEduCollegeId]);
+GO
+
+-- Creating foreign key on [College_Id] in table 'ActionsEduColleges'
+ALTER TABLE [dbo].[ActionsEduColleges]
+ADD CONSTRAINT [FK_ActionEduCollegeCollege]
+    FOREIGN KEY ([College_Id])
+    REFERENCES [dbo].[Colleges]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduCollegeCollege'
+CREATE INDEX [IX_FK_ActionEduCollegeCollege]
+ON [dbo].[ActionsEduColleges]
+    ([College_Id]);
+GO
+
+-- Creating foreign key on [ActionEdu_Id] in table 'ActionsEduColleges'
+ALTER TABLE [dbo].[ActionsEduColleges]
+ADD CONSTRAINT [FK_ActionEduCollegeActionEdu]
+    FOREIGN KEY ([ActionEdu_Id])
+    REFERENCES [dbo].[ActionsEdu]
+        ([Id])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_ActionEduCollegeActionEdu'
+CREATE INDEX [IX_FK_ActionEduCollegeActionEdu]
+ON [dbo].[ActionsEduColleges]
+    ([ActionEdu_Id]);
+GO
+
 -- --------------------------------------------------
 -- Script has ended
 -- --------------------------------------------------

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

@@ -62,9 +62,15 @@
     <Compile Include="Internal\ActionEduAxeFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
+    <Compile Include="Internal\ActionEduCollegeFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
     <Compile Include="Internal\ActionEduFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>
+    <Compile Include="Internal\ActionEduMissionFactory.cs">
+      <DependentUpon>GenericFactories.tt</DependentUpon>
+    </Compile>
     <Compile Include="Internal\ActionEduThematiqueFactory.cs">
       <DependentUpon>GenericFactories.tt</DependentUpon>
     </Compile>

+ 21 - 0
CD67.FicheCollege.Factory/Internal/ActionEduCollegeFactory.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 ActionEduCollegeFactory : Internal.BaseFactory<Entity.ActionEduCollege>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionEduCollegeFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+	

+ 21 - 0
CD67.FicheCollege.Factory/Internal/ActionEduMissionFactory.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 ActionEduMissionFactory : Internal.BaseFactory<Entity.ActionEduMission>
+	{
+		/// <summary>
+        /// Constructeur public lié au constructeur de base
+        /// </summary>
+        /// <param name="dbContext">Context Entity Framework utilisé dans la classe</param>
+		public ActionEduMissionFactory(Entities dbContext) : base(dbContext) { }
+	}
+}
+