Files
DbFirst/DbFirst/PlutoModel.edmx
2018-11-14 22:31:54 +01:00

459 lines
25 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Runtime content -->
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="PlutoModel.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="Authors">
<Key>
<PropertyRef Name="AuthorID" />
</Key>
<Property Name="AuthorID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Name" Type="varchar" MaxLength="255" Nullable="false" />
</EntityType>
<EntityType Name="Courses">
<Key>
<PropertyRef Name="CourseID" />
</Key>
<Property Name="CourseID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="AuthorID" Type="int" Nullable="false" />
<Property Name="Title" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="Description" Type="varchar" MaxLength="8000" Nullable="false" />
<Property Name="FullPrice" Type="smallint" Nullable="false" />
<Property Name="Level" Type="tinyint" Nullable="false" />
</EntityType>
<EntityType Name="CourseSections">
<Key>
<PropertyRef Name="SectionID" />
</Key>
<Property Name="SectionID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="CourseID" Type="int" Nullable="false" />
<Property Name="Title" Type="varchar" MaxLength="255" Nullable="false" />
</EntityType>
<EntityType Name="CourseTags">
<Key>
<PropertyRef Name="CourseID" />
<PropertyRef Name="TagID" />
</Key>
<Property Name="CourseID" Type="int" Nullable="false" />
<Property Name="TagID" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="Posts">
<Key>
<PropertyRef Name="PostID" />
</Key>
<Property Name="PostID" Type="int" Nullable="false" />
<Property Name="DatePublished" Type="smalldatetime" Nullable="false" />
<Property Name="Title" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="Body" Type="varchar" MaxLength="8000" Nullable="false" />
</EntityType>
<EntityType Name="Tags">
<Key>
<PropertyRef Name="TagID" />
</Key>
<Property Name="TagID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="Name" Type="varchar" MaxLength="50" Nullable="false" />
</EntityType>
<EntityType Name="tblUser">
<Key>
<PropertyRef Name="UserID" />
</Key>
<Property Name="UserID" Type="int" Nullable="false" />
<Property Name="Username" Type="varchar" MaxLength="50" Nullable="false" />
<Property Name="Password" Type="int" Nullable="false" />
</EntityType>
<Association Name="FK_Courses_Authors">
<End Role="Authors" Type="Self.Authors" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="Courses" Type="Self.Courses" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Authors">
<PropertyRef Name="AuthorID" />
</Principal>
<Dependent Role="Courses">
<PropertyRef Name="AuthorID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_CourseSections_Courses">
<End Role="Courses" Type="Self.Courses" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="CourseSections" Type="Self.CourseSections" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Courses">
<PropertyRef Name="CourseID" />
</Principal>
<Dependent Role="CourseSections">
<PropertyRef Name="CourseID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_CourseTags_Courses">
<End Role="Courses" Type="Self.Courses" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="CourseTags" Type="Self.CourseTags" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Courses">
<PropertyRef Name="CourseID" />
</Principal>
<Dependent Role="CourseTags">
<PropertyRef Name="CourseID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_CourseTags_Tags">
<End Role="Tags" Type="Self.Tags" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="CourseTags" Type="Self.CourseTags" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Tags">
<PropertyRef Name="TagID" />
</Principal>
<Dependent Role="CourseTags">
<PropertyRef Name="TagID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Function Name="DeleteCourse" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="CourseID" Type="int" Mode="In" />
</Function>
<Function Name="funcGetAuthorCourses" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="AuthorID" Type="int" Mode="In" />
<ReturnType>
<CollectionType>
<RowType>
<Property Name="CourseID" Type="int" Nullable="false" />
<Property Name="AuthorID" Type="int" Nullable="false" />
<Property Name="Title" Type="varchar" MaxLength="255" Nullable="false" />
<Property Name="Description" Type="varchar" MaxLength="8000" Nullable="false" />
<Property Name="Price" Type="smallint" Nullable="false" />
<Property Name="LevelString" Type="varchar" MaxLength="50" Nullable="false" />
<Property Name="Level" Type="tinyint" Nullable="false" />
</RowType>
</CollectionType>
</ReturnType>
</Function>
<Function Name="GetCourses" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
<Function Name="InsertCourse" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="AuthorID" Type="int" Mode="In" />
<Parameter Name="Title" Type="varchar" Mode="In" />
<Parameter Name="Description" Type="varchar" Mode="In" />
<Parameter Name="Price" Type="smallint" Mode="In" />
<Parameter Name="LevelString" Type="varchar" Mode="In" />
<Parameter Name="Level" Type="tinyint" Mode="In" />
</Function>
<Function Name="UpdateCourse" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
<Parameter Name="CourseID" Type="int" Mode="In" />
<Parameter Name="Title" Type="varchar" Mode="In" />
<Parameter Name="Description" Type="varchar" Mode="In" />
<Parameter Name="LevelString" Type="varchar" Mode="In" />
<Parameter Name="Level" Type="tinyint" Mode="In" />
</Function>
<EntityContainer Name="PlutoModelStoreContainer">
<EntitySet Name="Authors" EntityType="Self.Authors" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Courses" EntityType="Self.Courses" Schema="dbo" store:Type="Tables" />
<EntitySet Name="CourseSections" EntityType="Self.CourseSections" Schema="dbo" store:Type="Tables" />
<EntitySet Name="CourseTags" EntityType="Self.CourseTags" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Posts" EntityType="Self.Posts" Schema="dbo" store:Type="Tables" />
<EntitySet Name="Tags" EntityType="Self.Tags" Schema="dbo" store:Type="Tables" />
<EntitySet Name="tblUser" EntityType="Self.tblUser" Schema="dbo" store:Type="Tables" />
<AssociationSet Name="FK_Courses_Authors" Association="Self.FK_Courses_Authors">
<End Role="Authors" EntitySet="Authors" />
<End Role="Courses" EntitySet="Courses" />
</AssociationSet>
<AssociationSet Name="FK_CourseSections_Courses" Association="Self.FK_CourseSections_Courses">
<End Role="Courses" EntitySet="Courses" />
<End Role="CourseSections" EntitySet="CourseSections" />
</AssociationSet>
<AssociationSet Name="FK_CourseTags_Courses" Association="Self.FK_CourseTags_Courses">
<End Role="Courses" EntitySet="Courses" />
<End Role="CourseTags" EntitySet="CourseTags" />
</AssociationSet>
<AssociationSet Name="FK_CourseTags_Tags" Association="Self.FK_CourseTags_Tags">
<End Role="Tags" EntitySet="Tags" />
<End Role="CourseTags" EntitySet="CourseTags" />
</AssociationSet>
</EntityContainer>
</Schema></edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema Namespace="PlutoModel" 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">
<EntityType Name="Author">
<Key>
<PropertyRef Name="AuthorID" />
</Key>
<Property Name="AuthorID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Name" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
<NavigationProperty Name="Courses" Relationship="Self.FK_Courses_Authors" FromRole="Authors" ToRole="Courses" />
</EntityType>
<EntityType Name="Course">
<Key>
<PropertyRef Name="CourseID" />
</Key>
<Property Name="CourseID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="AuthorID" Type="Int32" Nullable="false" />
<Property Name="Title" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Description" Type="String" MaxLength="8000" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Level" Type="PlutoModel.CourseLevel" Nullable="false" />
<NavigationProperty Name="Author" Relationship="Self.FK_Courses_Authors" FromRole="Courses" ToRole="Authors" />
<NavigationProperty Name="CourseSections" Relationship="Self.FK_CourseSections_Courses" FromRole="Courses" ToRole="CourseSections" />
<NavigationProperty Name="Tags" Relationship="Self.CourseTags" FromRole="Courses" ToRole="Tags" />
<Property Name="FullPrice" Type="Int16" Nullable="false" />
</EntityType>
<EntityType Name="CourseSection">
<Key>
<PropertyRef Name="SectionID" />
</Key>
<Property Name="SectionID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="CourseID" Type="Int32" Nullable="false" />
<Property Name="Title" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
<NavigationProperty Name="Cours" Relationship="Self.FK_CourseSections_Courses" FromRole="CourseSections" ToRole="Courses" />
</EntityType>
<EntityType Name="Post">
<Key>
<PropertyRef Name="PostID" />
</Key>
<Property Name="PostID" Type="Int32" Nullable="false" />
<Property Name="DatePublished" Type="DateTime" Nullable="false" Precision="0" />
<Property Name="Title" Type="String" MaxLength="255" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Body" Type="String" MaxLength="8000" FixedLength="false" Unicode="false" Nullable="false" />
</EntityType>
<EntityType Name="Tag">
<Key>
<PropertyRef Name="TagID" />
</Key>
<Property Name="TagID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
<NavigationProperty Name="Courses" Relationship="Self.CourseTags" FromRole="Tags" ToRole="Courses" />
</EntityType>
<EntityType Name="tblUser">
<Key>
<PropertyRef Name="UserID" />
</Key>
<Property Name="UserID" Type="Int32" Nullable="false" />
<Property Name="Username" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
<Property Name="Password" Type="Int32" Nullable="false" />
</EntityType>
<Association Name="FK_Courses_Authors">
<End Role="Authors" Type="Self.Author" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="Courses" Type="PlutoModel.Course" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Authors">
<PropertyRef Name="AuthorID" />
</Principal>
<Dependent Role="Courses">
<PropertyRef Name="AuthorID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="FK_CourseSections_Courses">
<End Role="Courses" Type="PlutoModel.Course" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="CourseSections" Type="Self.CourseSection" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="Courses">
<PropertyRef Name="CourseID" />
</Principal>
<Dependent Role="CourseSections">
<PropertyRef Name="CourseID" />
</Dependent>
</ReferentialConstraint>
</Association>
<Association Name="CourseTags">
<End Role="Courses" Type="PlutoModel.Course" Multiplicity="*" />
<End Role="Tags" Type="Self.Tag" Multiplicity="*" />
</Association>
<EntityContainer Name="PlutoDbContext" annotation:LazyLoadingEnabled="true">
<EntitySet Name="Authors" EntityType="Self.Author" />
<EntitySet Name="Courses" EntityType="PlutoModel.Course" />
<EntitySet Name="CourseSections" EntityType="Self.CourseSection" />
<EntitySet Name="Posts" EntityType="Self.Post" />
<EntitySet Name="Tags" EntityType="Self.Tag" />
<EntitySet Name="tblUsers" EntityType="Self.tblUser" />
<AssociationSet Name="FK_Courses_Authors" Association="Self.FK_Courses_Authors">
<End Role="Authors" EntitySet="Authors" />
<End Role="Courses" EntitySet="Courses" />
</AssociationSet>
<AssociationSet Name="FK_CourseSections_Courses" Association="Self.FK_CourseSections_Courses">
<End Role="Courses" EntitySet="Courses" />
<End Role="CourseSections" EntitySet="CourseSections" />
</AssociationSet>
<AssociationSet Name="CourseTags" Association="Self.CourseTags">
<End Role="Courses" EntitySet="Courses" />
<End Role="Tags" EntitySet="Tags" />
</AssociationSet>
<FunctionImport Name="DeleteCourse">
<Parameter Name="CourseID" Mode="In" Type="Int32" />
</FunctionImport>
<FunctionImport Name="GetAuthorCourses" IsComposable="true" ReturnType="Collection(PlutoModel.funcGetAuthorCourses_Result)">
<Parameter Name="AuthorID" Mode="In" Type="Int32" />
</FunctionImport>
<FunctionImport Name="GetCourses" ReturnType="Collection(PlutoModel.GetCoursesResult)" />
<FunctionImport Name="InsertCourse">
<Parameter Name="AuthorID" Mode="In" Type="Int32" />
<Parameter Name="Title" Mode="In" Type="String" />
<Parameter Name="Description" Mode="In" Type="String" />
<Parameter Name="Price" Mode="In" Type="Int16" />
<Parameter Name="LevelString" Mode="In" Type="String" />
<Parameter Name="Level" Mode="In" Type="Byte" />
</FunctionImport>
<FunctionImport Name="UpdateCourse">
<Parameter Name="CourseID" Mode="In" Type="Int32" />
<Parameter Name="Title" Mode="In" Type="String" />
<Parameter Name="Description" Mode="In" Type="String" />
<Parameter Name="LevelString" Mode="In" Type="String" />
<Parameter Name="Level" Mode="In" Type="Byte" />
</FunctionImport>
</EntityContainer>
<ComplexType Name="funcGetAuthorCourses_Result">
<Property Type="Int32" Name="CourseID" Nullable="false" />
<Property Type="Int32" Name="AuthorID" Nullable="false" />
<Property Type="String" Name="Title" Nullable="false" MaxLength="255" />
<Property Type="String" Name="Description" Nullable="false" MaxLength="8000" />
<Property Type="Int16" Name="Price" Nullable="false" />
<Property Type="String" Name="LevelString" Nullable="false" MaxLength="50" />
<Property Type="Byte" Name="Level" Nullable="false" />
</ComplexType>
<ComplexType Name="GetCoursesResult">
<Property Type="Int32" Name="CourseID" Nullable="false" />
<Property Type="Int32" Name="AuthorID" Nullable="false" />
<Property Type="String" Name="Title" Nullable="false" MaxLength="255" />
<Property Type="String" Name="Description" Nullable="false" MaxLength="8000" />
<Property Type="Int16" Name="FullPrice" Nullable="false" />
<Property Type="String" Name="Level" Nullable="false" MaxLength="50" />
</ComplexType>
<EnumType Name="CourseLevel" UnderlyingType="Byte">
<Member Name="Beginner" Value="1" />
<Member Name="Intermediate" Value="2" />
<Member Name="Advanced" Value="3" />
</EnumType>
</Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
<edmx:Mappings>
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
<EntityContainerMapping StorageEntityContainer="PlutoModelStoreContainer" CdmEntityContainer="PlutoDbContext">
<EntitySetMapping Name="Authors">
<EntityTypeMapping TypeName="PlutoModel.Author">
<MappingFragment StoreEntitySet="Authors">
<ScalarProperty Name="AuthorID" ColumnName="AuthorID" />
<ScalarProperty Name="Name" ColumnName="Name" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Courses">
<EntityTypeMapping TypeName="PlutoModel.Course">
<MappingFragment StoreEntitySet="Courses">
<ScalarProperty Name="FullPrice" ColumnName="FullPrice" />
<ScalarProperty Name="CourseID" ColumnName="CourseID" />
<ScalarProperty Name="AuthorID" ColumnName="AuthorID" />
<ScalarProperty Name="Title" ColumnName="Title" />
<ScalarProperty Name="Description" ColumnName="Description" />
<ScalarProperty Name="Level" ColumnName="Level" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="CourseSections">
<EntityTypeMapping TypeName="PlutoModel.CourseSection">
<MappingFragment StoreEntitySet="CourseSections">
<ScalarProperty Name="SectionID" ColumnName="SectionID" />
<ScalarProperty Name="CourseID" ColumnName="CourseID" />
<ScalarProperty Name="Title" ColumnName="Title" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Posts">
<EntityTypeMapping TypeName="PlutoModel.Post">
<MappingFragment StoreEntitySet="Posts">
<ScalarProperty Name="PostID" ColumnName="PostID" />
<ScalarProperty Name="DatePublished" ColumnName="DatePublished" />
<ScalarProperty Name="Title" ColumnName="Title" />
<ScalarProperty Name="Body" ColumnName="Body" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="Tags">
<EntityTypeMapping TypeName="PlutoModel.Tag">
<MappingFragment StoreEntitySet="Tags">
<ScalarProperty Name="TagID" ColumnName="TagID" />
<ScalarProperty Name="Name" ColumnName="Name" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<EntitySetMapping Name="tblUsers">
<EntityTypeMapping TypeName="PlutoModel.tblUser">
<MappingFragment StoreEntitySet="tblUser">
<ScalarProperty Name="UserID" ColumnName="UserID" />
<ScalarProperty Name="Username" ColumnName="Username" />
<ScalarProperty Name="Password" ColumnName="Password" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
<AssociationSetMapping Name="CourseTags" TypeName="PlutoModel.CourseTags" StoreEntitySet="CourseTags">
<EndProperty Name="Courses">
<ScalarProperty Name="CourseID" ColumnName="CourseID" />
</EndProperty>
<EndProperty Name="Tags">
<ScalarProperty Name="TagID" ColumnName="TagID" />
</EndProperty>
</AssociationSetMapping>
<FunctionImportMapping FunctionImportName="DeleteCourse" FunctionName="PlutoModel.Store.DeleteCourse" />
<FunctionImportMapping FunctionImportName="GetAuthorCourses" FunctionName="PlutoModel.Store.funcGetAuthorCourses">
<ResultMapping>
<ComplexTypeMapping TypeName="PlutoModel.funcGetAuthorCourses_Result">
<ScalarProperty Name="CourseID" ColumnName="CourseID" />
<ScalarProperty Name="AuthorID" ColumnName="AuthorID" />
<ScalarProperty Name="Title" ColumnName="Title" />
<ScalarProperty Name="Description" ColumnName="Description" />
<ScalarProperty Name="Price" ColumnName="Price" />
<ScalarProperty Name="LevelString" ColumnName="LevelString" />
<ScalarProperty Name="Level" ColumnName="Level" />
</ComplexTypeMapping>
</ResultMapping>
</FunctionImportMapping>
<FunctionImportMapping FunctionImportName="GetCourses" FunctionName="PlutoModel.Store.GetCourses">
<ResultMapping>
<ComplexTypeMapping TypeName="PlutoModel.GetCoursesResult">
<ScalarProperty Name="CourseID" ColumnName="CourseID" />
<ScalarProperty Name="AuthorID" ColumnName="AuthorID" />
<ScalarProperty Name="Title" ColumnName="Title" />
<ScalarProperty Name="Description" ColumnName="Description" />
<ScalarProperty Name="FullPrice" ColumnName="FullPrice" />
<ScalarProperty Name="Level" ColumnName="Level" />
</ComplexTypeMapping>
</ResultMapping>
</FunctionImportMapping>
<FunctionImportMapping FunctionImportName="InsertCourse" FunctionName="PlutoModel.Store.InsertCourse" />
<FunctionImportMapping FunctionImportName="UpdateCourse" FunctionName="PlutoModel.Store.UpdateCourse" />
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>
</edmx:Runtime>
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<Connection>
<DesignerInfoPropertySet>
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
</DesignerInfoPropertySet>
</Connection>
<Options>
<DesignerInfoPropertySet>
<DesignerProperty Name="ValidateOnBuild" Value="true" />
<DesignerProperty Name="EnablePluralization" Value="true" />
<DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
<DesignerProperty Name="UseLegacyProvider" Value="false" />
<DesignerProperty Name="CodeGenerationStrategy" Value="None" />
</DesignerInfoPropertySet>
</Options>
<!-- Diagram content (shape and connector positions) -->
<Diagrams></Diagrams>
</Designer>
</edmx:Edmx>