Commits

Anonymous committed f6bb036

updating the entity model to add more properties

Comments (0)

Files changed (2)

development/src/Data/ContentModel.edmx

             <End Role="Post" EntitySet="Posts" />
             <End Role="Post1" EntitySet="Posts" />
           </AssociationSet>
+          <AssociationSet Name="FavoriteChildPost" Association="ContentModel.FavoriteChildPost">
+            <End Role="Post" EntitySet="Posts" />
+            <End Role="Post1" EntitySet="Posts" />
+          </AssociationSet>
         </EntityContainer>
         <EntityType Name="PostType">
           <Key>
         <EntityType Name="Post">
           <Key>
             <PropertyRef Name="Id" />
+            <PropertyRef Name="SeoUrlSuffix" />
           </Key>
           <Property Type="Guid" Name="Id" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Type="Int32" Name="Rating" Nullable="false" DefaultValue="0" />
           <Property Type="Boolean" Name="IsChildCreationAllowed" Nullable="false" DefaultValue="True" />
           <NavigationProperty Name="Children" Relationship="ContentModel.PostPost" FromRole="Post" ToRole="Post1" />
           <NavigationProperty Name="Parent" Relationship="ContentModel.PostPost" FromRole="Post1" ToRole="Post" />
+          <Property Type="String" Name="SeoUrlSuffix" Nullable="false" MaxLength="200" />
+          <NavigationProperty Name="FavoriteChild" Relationship="ContentModel.FavoriteChildPost" FromRole="Post" ToRole="Post1" />
         </EntityType>
         <EntityType Name="UserProfile">
           <Key>
             <PropertyRef Name="Id" />
+            <PropertyRef Name="DisplayName" />
           </Key>
           <Property Type="Guid" Name="Id" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Type="String" Name="DisplayName" Nullable="false" MaxLength="100" />
           <End Type="ContentModel.Post" Role="Post" Multiplicity="1" />
           <End Type="ContentModel.Post" Role="Post1" Multiplicity="*" />
         </Association>
+        <Association Name="FavoriteChildPost">
+          <End Type="ContentModel.Post" Role="Post" Multiplicity="1" />
+          <End Type="ContentModel.Post" Role="Post1" Multiplicity="1" />
+        </Association>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
     <edmx:Diagrams>
       <Diagram Name="ContentModel" >
         <EntityTypeShape EntityType="ContentModel.PostType" Width="1.5" PointX="1" PointY="1" Height="1.59568359375" />
-        <EntityTypeShape EntityType="ContentModel.Post" Width="2" PointX="3.125" PointY="1.875" Height="2.9417936197916656" />
+        <EntityTypeShape EntityType="ContentModel.Post" Width="2" PointX="3" PointY="0.5" Height="3.5186979166666656" />
         <EntityTypeShape EntityType="ContentModel.UserProfile" Width="1.5" PointX="6.625" PointY="0.5" Height="1.59568359375" />
         <AssociationConnector Association="ContentModel.PostTypePost">
-          <ConnectorPoint PointX="2.5" PointY="2.235341796875" />
-          <ConnectorPoint PointX="3.125" PointY="2.235341796875" />
+          <ConnectorPoint PointX="2.5" PointY="1.797841796875" />
+          <ConnectorPoint PointX="3" PointY="1.797841796875" />
         </AssociationConnector>
         <AssociationConnector Association="ContentModel.UserProfilePost">
-          <ConnectorPoint PointX="6.625" PointY="2.31128173828125" />
-          <ConnectorPoint PointX="5.125" PointY="2.31128173828125" />
+          <ConnectorPoint PointX="6.625" PointY="1.4901432291666668" />
+          <ConnectorPoint PointX="5" PointY="1.4901432291666668" />
         </AssociationConnector>
         <AssociationConnector Association="ContentModel.UserProfilePostVoting">
-          <ConnectorPoint PointX="6.625" PointY="2.0306408691406252" />
-          <ConnectorPoint PointX="5.125" PointY="2.0306408691406252" />
+          <ConnectorPoint PointX="6.625" PointY="0.93257161458333337" />
+          <ConnectorPoint PointX="5" PointY="0.93257161458333337" />
         </AssociationConnector>
         <AssociationConnector Association="ContentModel.PostPost">
-          <ConnectorPoint PointX="3.8342307692307696" PointY="5.201396484375" />
-          <ConnectorPoint PointX="3.8342307692307696" PointY="5.451396484375" />
-          <ConnectorPoint PointX="4.429615384615385" PointY="5.451396484375" />
-          <ConnectorPoint PointX="4.429615384615385" PointY="5.201396484375" />
+          <ConnectorPoint PointX="3.7092307692307696" PointY="4.0186979166666656" />
+          <ConnectorPoint PointX="3.7092307692307696" PointY="4.2686979166666656" />
+          <ConnectorPoint PointX="4.304615384615385" PointY="4.2686979166666656" />
+          <ConnectorPoint PointX="4.304615384615385" PointY="4.0186979166666656" />
+        </AssociationConnector>
+        <AssociationConnector Association="ContentModel.FavoriteChildPost">
+          <ConnectorPoint PointX="3.7092307692307696" PointY="0.5" />
+          <ConnectorPoint PointX="3.7092307692307696" PointY="0.24999999999999978" />
+          <ConnectorPoint PointX="4.304615384615385" PointY="0.24999999999999978" />
+          <ConnectorPoint PointX="4.304615384615385" PointY="0.5" />
         </AssociationConnector>
       </Diagram>
     </edmx:Diagrams>

development/src/Data/Post.cs

             set { _isChildCreationAllowed = value; }
         }
         private bool _isChildCreationAllowed = true;
+    
+        public virtual string SeoUrlSuffix
+        {
+            get;
+            set;
+        }
 
         #endregion
         #region Navigation Properties
             }
         }
         private Post _parent;
+    
+        public virtual Post FavoriteChild
+        {
+            get;
+            set;
+        }
 
         #endregion
         #region Association Fixup