GasStationModel.csdl 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="gr672_pgvModel" 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">
  3. <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
  4. <EntitySet Name="FuelType" EntityType="gr672_pgvModel.FuelType" />
  5. <EntitySet Name="FuelTypeOnGasStation" EntityType="gr672_pgvModel.FuelTypeOnGasStation" />
  6. <EntitySet Name="GasStation" EntityType="gr672_pgvModel.GasStation" />
  7. <AssociationSet Name="FK_FuelInGasStation_TypeOfFuel" Association="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel">
  8. <End Role="FuelType" EntitySet="FuelType" />
  9. <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
  10. </AssociationSet>
  11. <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="gr672_pgvModel.FK_FuelInGasStation_GasStation">
  12. <End Role="GasStation" EntitySet="GasStation" />
  13. <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
  14. </AssociationSet>
  15. </EntityContainer>
  16. <EntityType Name="FuelType">
  17. <Key>
  18. <PropertyRef Name="FuelTypeID" />
  19. </Key>
  20. <Property Name="FuelTypeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  21. <Property Name="NameFuelType" Type="String" Nullable="false" MaxLength="2" FixedLength="false" Unicode="true" />
  22. <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel" FromRole="FuelType" ToRole="FuelTypeOnGasStation" />
  23. </EntityType>
  24. <EntityType Name="FuelTypeOnGasStation">
  25. <Key>
  26. <PropertyRef Name="IDGasStation" />
  27. <PropertyRef Name="IDFuelType" />
  28. </Key>
  29. <Property Name="IDGasStation" Type="Int32" Nullable="false" />
  30. <Property Name="IDFuelType" Type="Int32" Nullable="false" />
  31. <Property Name="Price" Type="Double" Nullable="false" />
  32. <Property Name="AmountOfFuel" Type="Int32" Nullable="false" />
  33. <NavigationProperty Name="FuelType" Relationship="gr672_pgvModel.FK_FuelInGasStation_TypeOfFuel" FromRole="FuelTypeOnGasStation" ToRole="FuelType" />
  34. <NavigationProperty Name="GasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_GasStation" FromRole="FuelTypeOnGasStation" ToRole="GasStation" />
  35. </EntityType>
  36. <EntityType Name="GasStation">
  37. <Key>
  38. <PropertyRef Name="GasStationID" />
  39. </Key>
  40. <Property Name="GasStationID" Type="Int32" Nullable="false" />
  41. <Property Name="Address" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
  42. <NavigationProperty Name="FuelTypeOnGasStation" Relationship="gr672_pgvModel.FK_FuelInGasStation_GasStation" FromRole="GasStation" ToRole="FuelTypeOnGasStation" />
  43. </EntityType>
  44. <Association Name="FK_FuelInGasStation_TypeOfFuel">
  45. <End Type="gr672_pgvModel.FuelType" Role="FuelType" Multiplicity="1" />
  46. <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
  47. <ReferentialConstraint>
  48. <Principal Role="FuelType">
  49. <PropertyRef Name="FuelTypeID" />
  50. </Principal>
  51. <Dependent Role="FuelTypeOnGasStation">
  52. <PropertyRef Name="IDFuelType" />
  53. </Dependent>
  54. </ReferentialConstraint>
  55. </Association>
  56. <Association Name="FK_FuelInGasStation_GasStation">
  57. <End Type="gr672_pgvModel.GasStation" Role="GasStation" Multiplicity="1" />
  58. <End Type="gr672_pgvModel.FuelTypeOnGasStation" Role="FuelTypeOnGasStation" Multiplicity="*" />
  59. <ReferentialConstraint>
  60. <Principal Role="GasStation">
  61. <PropertyRef Name="GasStationID" />
  62. </Principal>
  63. <Dependent Role="FuelTypeOnGasStation">
  64. <PropertyRef Name="IDGasStation" />
  65. </Dependent>
  66. </ReferentialConstraint>
  67. </Association>
  68. </Schema>