소스 검색

FIX Optimisation des fichiers de config

julien.legrand 9 년 전
부모
커밋
062d655c06

+ 0 - 21
CD67.ModeleMVC.Entity/ANNEE.cs

@@ -1,21 +0,0 @@
-//------------------------------------------------------------------------------
-// <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.ModeleMVC.Entity
-{
-    using System;
-    using System.Collections.Generic;
-    
-    public partial class ANNEE
-    {
-        public decimal ANN_IDE { get; set; }
-        public string ANN_LIB { get; set; }
-        public Nullable<decimal> ANN_PREC { get; set; }
-    }
-}

+ 2 - 1
CD67.ModeleMVC.Entity/App.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-  <!-- Configuration minimale pour avoir la connexion à la base de données pour le Model -->
+  <!-- Configuration minimale pour avoir accès à la connexion à la base de données pour le Model -->
   <configSections>
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
   </configSections>
@@ -16,6 +16,7 @@
   </entityFramework>
 
   <connectionStrings>
+    <!-- Copie locale de la chaine de connexion pour l'éditeur graphique de modèle -->
     <add name="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=T-ORADB-01.cg67.fr:1523/ETU811;PASSWORD=fer;USER ID=FER&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
 </configuration>

+ 0 - 3
CD67.ModeleMVC.Entity/CD67.ModeleMVC.Entity.csproj

@@ -58,9 +58,6 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="ANNEE.cs">
-      <DependentUpon>EntityModel.tt</DependentUpon>
-    </Compile>
     <Compile Include="EntityModel.Context.cs">
       <AutoGen>True</AutoGen>
       <DesignTime>True</DesignTime>

+ 0 - 1
CD67.ModeleMVC.Entity/EntityModel.Context.cs

@@ -26,6 +26,5 @@ namespace CD67.ModeleMVC.Entity
         }
     
         public virtual DbSet<PARAM> PARAM { get; set; }
-        public virtual DbSet<ANNEE> ANNEE { get; set; }
     }
 }

+ 0 - 27
CD67.ModeleMVC.Entity/EntityModel.edmx

@@ -5,14 +5,6 @@
     <!-- SSDL content -->
     <edmx:StorageModels>
     <Schema Namespace="Model.Store" Provider="Oracle.ManagedDataAccess.Client" ProviderManifestToken="11.2" 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="ANNEE">
-          <Key>
-            <PropertyRef Name="ANN_IDE" />
-          </Key>
-          <Property Name="ANN_IDE" Type="number" Precision="38" Scale="0" Nullable="false" />
-          <Property Name="ANN_LIB" Type="varchar2" MaxLength="9" Nullable="false" />
-          <Property Name="ANN_PREC" Type="number" Precision="38" Scale="0" />
-        </EntityType>
         <EntityType Name="PARAM">
           <Key>
             <PropertyRef Name="PRM_CLE" />
@@ -22,7 +14,6 @@
           <Property Name="PRM_LIB2" Type="varchar2" MaxLength="100" />
         </EntityType>
         <EntityContainer Name="ModelStoreContainer">
-          <EntitySet Name="ANNEE" EntityType="Self.ANNEE" Schema="FER" store:Type="Tables" />
           <EntitySet Name="PARAM" EntityType="Self.PARAM" Schema="FER" store:Type="Tables" />
         </EntityContainer>
       </Schema></edmx:StorageModels>
@@ -39,16 +30,7 @@
         </EntityType>
         <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
           <EntitySet Name="PARAM" EntityType="Self.PARAM" />
-          <EntitySet Name="ANNEE" EntityType="Model.ANNEE" />
         </EntityContainer>
-        <EntityType Name="ANNEE">
-          <Key>
-            <PropertyRef Name="ANN_IDE" />
-          </Key>
-          <Property Name="ANN_IDE" Type="Decimal" Nullable="false" Precision="38" Scale="0" />
-          <Property Name="ANN_LIB" Type="String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="false" />
-          <Property Name="ANN_PREC" Type="Decimal" Precision="38" Scale="0" />
-        </EntityType>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -64,15 +46,6 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
-          <EntitySetMapping Name="ANNEE">
-            <EntityTypeMapping TypeName="Model.ANNEE">
-              <MappingFragment StoreEntitySet="ANNEE">
-                <ScalarProperty Name="ANN_PREC" ColumnName="ANN_PREC" />
-                <ScalarProperty Name="ANN_LIB" ColumnName="ANN_LIB" />
-                <ScalarProperty Name="ANN_IDE" ColumnName="ANN_IDE" />
-              </MappingFragment>
-            </EntityTypeMapping>
-          </EntitySetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 0 - 1
CD67.ModeleMVC.Entity/EntityModel.edmx.diagram

@@ -6,7 +6,6 @@
     <edmx:Diagrams>
       <Diagram DiagramId="9960fb8cd7934be39d08423c28f9279b" Name="Diagram1">
         <EntityTypeShape EntityType="Model.PARAM" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="Model.ANNEE" Width="1.5" PointX="3.375" PointY="0.75" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 4 - 15
CD67.ModeleMVC.MVC/Web.config

@@ -7,8 +7,11 @@
   <configSections>
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
   </configSections>
+  <connectionStrings>
+    <!-- Connexion à la base de données utilisée par l'application -->
+    <add name="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=T-ORADB-01.cg67.fr:1523/ETU811;PASSWORD=fer;USER ID=FER&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
   <appSettings>
     <add key="webpages:Version" value="2.0.0.0" />
     <add key="webpages:Enabled" value="false" />
@@ -49,20 +52,6 @@
     </providers>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
   </entityFramework>
-  <oracle.manageddataaccess.client>
-    <version number="*">
-      <dataSources>
-        <!-- Définition du datasource, cet alias est utilisé par la connexion Entity -->
-        <dataSource alias="ETU811" descriptor="(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = T-ORADB-01.cg67.fr)(PORT =  1523)))(CONNECT_DATA =(SERVICE_NAME = ETU811)))" />
-      </dataSources>
-    </version>
-  </oracle.manageddataaccess.client>
-  <connectionStrings>
-    <!-- 1ère connexion nécessaire pour créer le model Entity -->
-    <add name="OracleConnection" providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=FER;Password=fer;Data Source=T-ORADB-01.cg67.fr:1523/ETU811" />
-    <!-- Connexion Entity -->
-    <add name="Entities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=ETU811;PASSWORD=fer;PERSIST SECURITY INFO=True;USER ID=FER;VALIDATE CONNECTION=False&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>