Commit ab4fba15 authored by Carole Treser's avatar Carole Treser Committed by Anthony Mochel
Browse files

feat(weather): update edmx and try to store data into database

parent f2a1b9b0
// La génération de code T4 est activée pour le modèle 'C:\CNAM\2A\Darmstadt\BeeWeatherPollenTracker\BeeWeatherPollenTracker\BeesWeatherModel.edmx'.
// La génération de code T4 est activée pour le modèle 'C:\CNAM\2A\Darmstadt\bee-weather\BeeWeatherPollenTracker\BeesWeatherModel.edmx'.
// Pour activer la génération de code héritée, définissez la valeur de la propriété
// du concepteur 'Stratégie de génération de code' sur 'ObjectContext hérité'. Cette propriété est disponible dans la fenêtre Propriétés lorsque le modèle
// est ouvert dans le concepteur.
......
......@@ -4,7 +4,7 @@
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="delmeModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" 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">
<Schema Namespace="delmeModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.5" 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="beehive_poll_forecast">
<Key>
<PropertyRef Name="Id" />
......@@ -26,11 +26,10 @@
<Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Input_date" Type="date" Nullable="false" />
<Property Name="Forecast_date" Type="date" Nullable="false" />
<Property Name="Temperature" Type="float" Nullable="false" />
<Property Name="Wind" Type="float" Nullable="false" />
<Property Name="Humidity" Type="int" Nullable="false" />
<Property Name="Temperature" Type="double" Nullable="false" />
<Property Name="Wind" Type="double" Nullable="false" />
<Property Name="Humidity" Type="double" Nullable="false" />
<Property Name="Cloudiness" Type="varchar" MaxLength="256" Nullable="false" />
<Property Name="Pressure" Type="int" Nullable="false" />
<Property Name="Location" Type="varchar" MaxLength="256" Nullable="false" />
</EntityType>
<EntityType Name="ref_beehive_poll_forecast">
......@@ -93,27 +92,43 @@
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:StorageModels>
</Schema></edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema Namespace="delmeModel" 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">
<EntityContainer Name="delmeEntities1" annotation:LazyLoadingEnabled="true">
<EntitySet Name="beehive_poll_forecast" EntityType="delmeModel.beehive_poll_forecast" />
<EntitySet Name="beehive_weather_forecast" EntityType="delmeModel.beehive_weather_forecast" />
<EntitySet Name="ref_beehive_poll_forecast" EntityType="delmeModel.ref_beehive_poll_forecast" />
<AssociationSet Name="fk_ref_pollen_day_after_to" Association="delmeModel.fk_ref_pollen_day_after_to">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
<AssociationSet Name="fk_ref_pollen_today" Association="delmeModel.fk_ref_pollen_today">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
<AssociationSet Name="fk_ref_pollen_tomorrow" Association="delmeModel.fk_ref_pollen_tomorrow">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
</EntityContainer>
<EntityType Name="beehive_poll_forecast">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Last_update_on" Type="DateTime" Nullable="false" />
<Property Name="Region_name" Type="String" MaxLength="256" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Part_region_name" Type="String" MaxLength="256" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Day_after_to" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Tomorrow" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Today" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Pollen" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Region_name" Type="String" Nullable="false" MaxLength="256" FixedLength="false" Unicode="false" />
<Property Name="Part_region_name" Type="String" Nullable="false" MaxLength="256" FixedLength="false" Unicode="false" />
<Property Name="Day_after_to" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="Tomorrow" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="Today" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="Pollen" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
<Property Name="Sender" Type="String" MaxLength="256" FixedLength="false" Unicode="false" />
<NavigationProperty Name="ref_beehive_poll_forecast" Relationship="Self.fk_ref_pollen_day_after_to" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
<NavigationProperty Name="ref_beehive_poll_forecast1" Relationship="Self.fk_ref_pollen_today" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
<NavigationProperty Name="ref_beehive_poll_forecast2" Relationship="Self.fk_ref_pollen_tomorrow" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
<NavigationProperty Name="ref_beehive_poll_forecast" Relationship="delmeModel.fk_ref_pollen_day_after_to" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
<NavigationProperty Name="ref_beehive_poll_forecast1" Relationship="delmeModel.fk_ref_pollen_today" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
<NavigationProperty Name="ref_beehive_poll_forecast2" Relationship="delmeModel.fk_ref_pollen_tomorrow" FromRole="beehive_poll_forecast" ToRole="ref_beehive_poll_forecast" />
</EntityType>
<EntityType Name="beehive_weather_forecast">
<Key>
......@@ -122,26 +137,25 @@
<Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Input_date" Type="DateTime" Nullable="false" />
<Property Name="Forecast_date" Type="DateTime" Nullable="false" />
<Property Name="Temperature" Type="Single" Nullable="false" />
<Property Name="Wind" Type="Single" Nullable="false" />
<Property Name="Humidity" Type="Int32" Nullable="false" />
<Property Name="Cloudiness" Type="String" MaxLength="256" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Pressure" Type="Int32" Nullable="false" />
<Property Name="Location" Type="String" MaxLength="256" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Temperature" Type="Double" Nullable="false" />
<Property Name="Wind" Type="Double" Nullable="false" />
<Property Name="Humidity" Type="Double" Nullable="false" />
<Property Name="Cloudiness" Type="String" Nullable="false" MaxLength="256" FixedLength="false" Unicode="false" />
<Property Name="Location" Type="String" Nullable="false" MaxLength="256" FixedLength="false" Unicode="false" />
</EntityType>
<EntityType Name="ref_beehive_poll_forecast">
<Key>
<PropertyRef Name="Id_pollen_measure" />
</Key>
<Property Name="Id_pollen_measure" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Legend_pollen_measure" Type="String" MaxLength="256" FixedLength="false" Unicode="false" Nullable="false" />
<NavigationProperty Name="beehive_poll_forecast" Relationship="Self.fk_ref_pollen_day_after_to" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
<NavigationProperty Name="beehive_poll_forecast1" Relationship="Self.fk_ref_pollen_today" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
<NavigationProperty Name="beehive_poll_forecast2" Relationship="Self.fk_ref_pollen_tomorrow" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
<Property Name="Id_pollen_measure" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
<Property Name="Legend_pollen_measure" Type="String" Nullable="false" MaxLength="256" FixedLength="false" Unicode="false" />
<NavigationProperty Name="beehive_poll_forecast" Relationship="delmeModel.fk_ref_pollen_day_after_to" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
<NavigationProperty Name="beehive_poll_forecast1" Relationship="delmeModel.fk_ref_pollen_today" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
<NavigationProperty Name="beehive_poll_forecast2" Relationship="delmeModel.fk_ref_pollen_tomorrow" FromRole="ref_beehive_poll_forecast" ToRole="beehive_poll_forecast" />
</EntityType>
<Association Name="fk_ref_pollen_day_after_to">
<End Role="ref_beehive_poll_forecast" Type="Self.ref_beehive_poll_forecast" Multiplicity="1" />
<End Role="beehive_poll_forecast" Type="Self.beehive_poll_forecast" Multiplicity="*" />
<End Type="delmeModel.ref_beehive_poll_forecast" Role="ref_beehive_poll_forecast" Multiplicity="1" />
<End Type="delmeModel.beehive_poll_forecast" Role="beehive_poll_forecast" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="ref_beehive_poll_forecast">
<PropertyRef Name="Id_pollen_measure" />
......@@ -152,8 +166,8 @@
</ReferentialConstraint>
</Association>
<Association Name="fk_ref_pollen_today">
<End Role="ref_beehive_poll_forecast" Type="Self.ref_beehive_poll_forecast" Multiplicity="1" />
<End Role="beehive_poll_forecast" Type="Self.beehive_poll_forecast" Multiplicity="*" />
<End Type="delmeModel.ref_beehive_poll_forecast" Role="ref_beehive_poll_forecast" Multiplicity="1" />
<End Type="delmeModel.beehive_poll_forecast" Role="beehive_poll_forecast" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="ref_beehive_poll_forecast">
<PropertyRef Name="Id_pollen_measure" />
......@@ -164,8 +178,8 @@
</ReferentialConstraint>
</Association>
<Association Name="fk_ref_pollen_tomorrow">
<End Role="ref_beehive_poll_forecast" Type="Self.ref_beehive_poll_forecast" Multiplicity="1" />
<End Role="beehive_poll_forecast" Type="Self.beehive_poll_forecast" Multiplicity="*" />
<End Type="delmeModel.ref_beehive_poll_forecast" Role="ref_beehive_poll_forecast" Multiplicity="1" />
<End Type="delmeModel.beehive_poll_forecast" Role="beehive_poll_forecast" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="ref_beehive_poll_forecast">
<PropertyRef Name="Id_pollen_measure" />
......@@ -175,23 +189,6 @@
</Dependent>
</ReferentialConstraint>
</Association>
<EntityContainer Name="delmeEntities1" annotation:LazyLoadingEnabled="true">
<EntitySet Name="beehive_poll_forecast" EntityType="Self.beehive_poll_forecast" />
<EntitySet Name="beehive_weather_forecast" EntityType="Self.beehive_weather_forecast" />
<EntitySet Name="ref_beehive_poll_forecast" EntityType="Self.ref_beehive_poll_forecast" />
<AssociationSet Name="fk_ref_pollen_day_after_to" Association="Self.fk_ref_pollen_day_after_to">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
<AssociationSet Name="fk_ref_pollen_today" Association="Self.fk_ref_pollen_today">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
<AssociationSet Name="fk_ref_pollen_tomorrow" Association="Self.fk_ref_pollen_tomorrow">
<End Role="ref_beehive_poll_forecast" EntitySet="ref_beehive_poll_forecast" />
<End Role="beehive_poll_forecast" EntitySet="beehive_poll_forecast" />
</AssociationSet>
</EntityContainer>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
......@@ -201,38 +198,37 @@
<EntitySetMapping Name="beehive_poll_forecast">
<EntityTypeMapping TypeName="delmeModel.beehive_poll_forecast">
<MappingFragment StoreEntitySet="beehive_poll_forecast">
<ScalarProperty Name="Id" ColumnName="Id" />
<ScalarProperty Name="Last_update_on" ColumnName="Last_update_on" />
<ScalarProperty Name="Region_name" ColumnName="Region_name" />
<ScalarProperty Name="Part_region_name" ColumnName="Part_region_name" />
<ScalarProperty Name="Day_after_to" ColumnName="Day_after_to" />
<ScalarProperty Name="Tomorrow" ColumnName="Tomorrow" />
<ScalarProperty Name="Today" ColumnName="Today" />
<ScalarProperty Name="Pollen" ColumnName="Pollen" />
<ScalarProperty Name="Sender" ColumnName="Sender" />
<ScalarProperty Name="Pollen" ColumnName="Pollen" />
<ScalarProperty Name="Today" ColumnName="Today" />
<ScalarProperty Name="Tomorrow" ColumnName="Tomorrow" />
<ScalarProperty Name="Day_after_to" ColumnName="Day_after_to" />
<ScalarProperty Name="Part_region_name" ColumnName="Part_region_name" />
<ScalarProperty Name="Region_name" ColumnName="Region_name" />
<ScalarProperty Name="Last_update_on" ColumnName="Last_update_on" />
<ScalarProperty Name="Id" ColumnName="Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="beehive_weather_forecast">
<EntityTypeMapping TypeName="delmeModel.beehive_weather_forecast">
<MappingFragment StoreEntitySet="beehive_weather_forecast">
<ScalarProperty Name="Id" ColumnName="Id" />
<ScalarProperty Name="Input_date" ColumnName="Input_date" />
<ScalarProperty Name="Forecast_date" ColumnName="Forecast_date" />
<ScalarProperty Name="Temperature" ColumnName="Temperature" />
<ScalarProperty Name="Wind" ColumnName="Wind" />
<ScalarProperty Name="Humidity" ColumnName="Humidity" />
<ScalarProperty Name="Cloudiness" ColumnName="Cloudiness" />
<ScalarProperty Name="Pressure" ColumnName="Pressure" />
<ScalarProperty Name="Location" ColumnName="Location" />
<ScalarProperty Name="Cloudiness" ColumnName="Cloudiness" />
<ScalarProperty Name="Humidity" ColumnName="Humidity" />
<ScalarProperty Name="Wind" ColumnName="Wind" />
<ScalarProperty Name="Temperature" ColumnName="Temperature" />
<ScalarProperty Name="Forecast_date" ColumnName="Forecast_date" />
<ScalarProperty Name="Input_date" ColumnName="Input_date" />
<ScalarProperty Name="Id" ColumnName="Id" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="ref_beehive_poll_forecast">
<EntityTypeMapping TypeName="delmeModel.ref_beehive_poll_forecast">
<MappingFragment StoreEntitySet="ref_beehive_poll_forecast">
<ScalarProperty Name="Id_pollen_measure" ColumnName="Id_pollen_measure" />
<ScalarProperty Name="Legend_pollen_measure" ColumnName="Legend_pollen_measure" />
<ScalarProperty Name="Id_pollen_measure" ColumnName="Id_pollen_measure" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
......
......@@ -5,12 +5,12 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="a9f5fe2bbdd242e5ac225199ca985c2c" Name="Diagram1">
<EntityTypeShape EntityType="delmeModel.beehive_poll_forecast" Width="1.5" PointX="3" PointY="1" IsExpanded="true" />
<EntityTypeShape EntityType="delmeModel.beehive_weather_forecast" Width="1.5" PointX="5.75" PointY="0.75" IsExpanded="true" />
<EntityTypeShape EntityType="delmeModel.ref_beehive_poll_forecast" Width="1.5" PointX="0.75" PointY="1.625" IsExpanded="true" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_day_after_to" ManuallyRouted="false" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_today" ManuallyRouted="false" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_tomorrow" ManuallyRouted="false" />
<EntityTypeShape EntityType="delmeModel.beehive_poll_forecast" Width="1.5" PointX="3" PointY="1" />
<EntityTypeShape EntityType="delmeModel.beehive_weather_forecast" Width="1.5" PointX="5.75" PointY="0.75" />
<EntityTypeShape EntityType="delmeModel.ref_beehive_poll_forecast" Width="1.5" PointX="0.75" PointY="1.625" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_day_after_to" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_today" />
<AssociationConnector Association="delmeModel.fk_ref_pollen_tomorrow" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
......
......@@ -17,11 +17,10 @@ namespace BeeWeatherPollenTracker
public int Id { get; set; }
public System.DateTime Input_date { get; set; }
public System.DateTime Forecast_date { get; set; }
public float Temperature { get; set; }
public float Wind { get; set; }
public int Humidity { get; set; }
public double Temperature { get; set; }
public double Wind { get; set; }
public double Humidity { get; set; }
public string Cloudiness { get; set; }
public int Pressure { get; set; }
public string Location { get; set; }
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment