Permalink
Browse files

Oppdatert databse

  • Loading branch information...
1 parent 3d1e0e2 commit 0fc63be0133bc4756056886a5210f9e14c98b806 Unknown committed Oct 6, 2011
Showing with 740 additions and 52 deletions.
  1. +32 −6 JoMAR/DataClasses1.dbml
  2. +47 −7 JoMAR/DataClasses1.dbml.layout
  3. +656 −38 JoMAR/DataClasses1.designer.cs
  4. +5 −1 JoMAR/Web.config
@@ -1,19 +1,45 @@
<?xml version="1.0" encoding="utf-8"?><Database Name="gruppe2_h11" Class="DataClasses1DataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
- <Connection Mode="WebSettings" ConnectionString="Data Source=malmen.hin.no;Initial Catalog=gruppe2_h11;User ID=gruppe2" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="gruppe2_h11ConnectionString" Provider="System.Data.SqlClient" />
+ <Connection Mode="WebSettings" ConnectionString="Data Source=malmen.hin.no;Initial Catalog=gruppe2_h11;User ID=gruppe2" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="gruppe2_h11ConnectionString1" Provider="System.Data.SqlClient" />
+ <Table Name="dbo.UserRooms" Member="UserRooms">
+ <Type Name="UserRoom">
+ <Column Name="userID" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+ <Column Name="roomID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
+ <Association Name="User_UserRoom" Member="User" ThisKey="userID" OtherKey="UserID" Type="User" IsForeignKey="true" />
+ <Association Name="ChatRoom_UserRoom" Member="ChatRoom" ThisKey="roomID" OtherKey="RoomID" Type="ChatRoom" IsForeignKey="true" />
+ </Type>
+ </Table>
+ <Table Name="dbo.ChatMessages" Member="ChatMessages">
+ <Type Name="ChatMessage">
+ <Column Name="messageID" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+ <Column Name="Date" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
+ <Column Name="Text" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
+ <Column Name="userID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
+ <Column Name="chatRoomID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
+ <Association Name="User_ChatMessage" Member="User" ThisKey="userID" OtherKey="UserID" Type="User" IsForeignKey="true" />
+ <Association Name="ChatRoom_ChatMessage" Member="ChatRoom" ThisKey="chatRoomID" OtherKey="RoomID" Type="ChatRoom" IsForeignKey="true" />
+ </Type>
+ </Table>
<Table Name="dbo.Users" Member="Users">
<Type Name="User">
- <Column Name="Id" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
+ <Column Name="UserID" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
<Column Name="Nick" Type="System.String" DbType="VarChar(15) NOT NULL" CanBeNull="false" />
<Column Name="Email" Type="System.String" DbType="VarChar(255)" CanBeNull="true" />
<Column Name="Password" Type="System.String" DbType="VarChar(255) NOT NULL" CanBeNull="false" />
- <Association Name="User_ChatRoom" Member="ChatRooms" ThisKey="Id" OtherKey="UserId" Type="ChatRoom" />
+ <Association Name="User_UserRoom" Member="UserRooms" ThisKey="UserID" OtherKey="userID" Type="UserRoom" Cardinality="One" />
+ <Association Name="User_ChatMessage" Member="ChatMessages" ThisKey="UserID" OtherKey="userID" Type="ChatMessage" />
+ <Association Name="User_ChatRoom" Member="ChatRooms" ThisKey="UserID" OtherKey="UserID" Type="ChatRoom" />
</Type>
</Table>
<Table Name="dbo.ChatRooms" Member="ChatRooms">
<Type Name="ChatRoom">
- <Column Name="Id" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
- <Column Name="UserId" Type="System.Int32" DbType="Int" CanBeNull="true" />
- <Association Name="User_ChatRoom" Member="User" ThisKey="UserId" OtherKey="Id" Type="User" IsForeignKey="true" />
+ <Column Name="RoomID" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
+ <Column Name="UserID" Type="System.Int32" DbType="Int" CanBeNull="true" />
+ <Column Name="Name" Type="System.String" DbType="NVarChar(50) NOT NULL" CanBeNull="false" />
+ <Column Name="isPublic" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
+ <Column Name="isPrivate" Type="System.Boolean" DbType="Bit NOT NULL" CanBeNull="false" />
+ <Association Name="ChatRoom_ChatMessage" Member="ChatMessages" ThisKey="RoomID" OtherKey="chatRoomID" Type="ChatMessage" />
+ <Association Name="ChatRoom_UserRoom" Member="UserRooms" ThisKey="RoomID" OtherKey="roomID" Type="UserRoom" />
+ <Association Name="User_ChatRoom" Member="User" ThisKey="UserID" OtherKey="UserID" Type="User" IsForeignKey="true" />
</Type>
</Table>
</Database>
@@ -2,23 +2,63 @@
<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" name="DataClasses1">
<DataContextMoniker Name="/DataClasses1DataContext" />
<nestedChildShapes>
- <classShape Id="58185681-34ac-4c87-838f-f50b12140013" absoluteBounds="0.5, 0.5, 2, 1.5785953776041666">
+ <classShape Id="eb2ab765-b058-4f92-b610-422cbe640ede" absoluteBounds="0.5, 3.125, 2, 1.1939925130208333">
+ <DataClassMoniker Name="/DataClasses1DataContext/UserRoom" />
+ <nestedChildShapes>
+ <elementListCompartment Id="127073c9-b915-4cca-9974-b611e6c2d05a" absoluteBounds="0.51500000000000057, 3.585, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+ </nestedChildShapes>
+ </classShape>
+ <classShape Id="48f3bcbd-c610-42d1-8223-d5d3fb16c126" absoluteBounds="4.125, 0.5, 2, 1.7708968098958331">
+ <DataClassMoniker Name="/DataClasses1DataContext/ChatMessage" />
+ <nestedChildShapes>
+ <elementListCompartment Id="3cd167df-137d-49d8-9850-23601c483baf" absoluteBounds="4.1400000000000006, 0.96, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+ </nestedChildShapes>
+ </classShape>
+ <classShape Id="faf72b08-7f14-492c-a818-f3a1b6156580" absoluteBounds="1, 0.5, 2, 1.5785953776041666">
<DataClassMoniker Name="/DataClasses1DataContext/User" />
<nestedChildShapes>
- <elementListCompartment Id="ba963580-128c-482d-97ac-2899d3eb6f4b" absoluteBounds="0.515, 0.96, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+ <elementListCompartment Id="3fd5e02e-8b04-47be-b805-97fec7ff4673" absoluteBounds="1.0150000000000006, 0.96, 1.9700000000000002, 1.0185953776041665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</classShape>
- <classShape Id="77e658d4-73e3-4b6f-a08b-7007e95912d6" absoluteBounds="3, 0.5, 2, 1.1939925130208333">
+ <classShape Id="a2f065bc-f4b7-4ef5-b8fd-f951cf576e4d" absoluteBounds="4.5, 3.875, 2, 1.7708968098958331">
<DataClassMoniker Name="/DataClasses1DataContext/ChatRoom" />
<nestedChildShapes>
- <elementListCompartment Id="645f239c-00d9-4f75-a55f-0226e78bc065" absoluteBounds="3.015, 0.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+ <elementListCompartment Id="c21336b2-fd2e-4ed3-b761-b785aa4e8f2b" absoluteBounds="4.515, 4.335, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</classShape>
- <associationConnector edgePoints="[(2.5 : 1.09699625651042); (3 : 1.09699625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+ <associationConnector edgePoints="[(1.75 : 2.07859537760417); (1.75 : 3.125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+ <AssociationMoniker Name="/DataClasses1DataContext/User/User_UserRoom" />
+ <nodes>
+ <classShapeMoniker Id="faf72b08-7f14-492c-a818-f3a1b6156580" />
+ <classShapeMoniker Id="eb2ab765-b058-4f92-b610-422cbe640ede" />
+ </nodes>
+ </associationConnector>
+ <associationConnector edgePoints="[(3 : 1.28929768880208); (4.125 : 1.28929768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+ <AssociationMoniker Name="/DataClasses1DataContext/User/User_ChatMessage" />
+ <nodes>
+ <classShapeMoniker Id="faf72b08-7f14-492c-a818-f3a1b6156580" />
+ <classShapeMoniker Id="48f3bcbd-c610-42d1-8223-d5d3fb16c126" />
+ </nodes>
+ </associationConnector>
+ <associationConnector edgePoints="[(5.3125 : 3.875); (5.3125 : 2.27089680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+ <AssociationMoniker Name="/DataClasses1DataContext/ChatRoom/ChatRoom_ChatMessage" />
+ <nodes>
+ <classShapeMoniker Id="a2f065bc-f4b7-4ef5-b8fd-f951cf576e4d" />
+ <classShapeMoniker Id="48f3bcbd-c610-42d1-8223-d5d3fb16c126" />
+ </nodes>
+ </associationConnector>
+ <associationConnector edgePoints="[(3 : 2.07859537760417); (3 : 4.22708605375744); (4.5 : 4.22708605375744)]" manuallyRouted="true" fixedFrom="Algorithm" fixedTo="Caller">
<AssociationMoniker Name="/DataClasses1DataContext/User/User_ChatRoom" />
<nodes>
- <classShapeMoniker Id="58185681-34ac-4c87-838f-f50b12140013" />
- <classShapeMoniker Id="77e658d4-73e3-4b6f-a08b-7007e95912d6" />
+ <classShapeMoniker Id="faf72b08-7f14-492c-a818-f3a1b6156580" />
+ <classShapeMoniker Id="a2f065bc-f4b7-4ef5-b8fd-f951cf576e4d" />
+ </nodes>
+ </associationConnector>
+ <associationConnector edgePoints="[(4.5 : 4.98244516145833); (1.53572465152846 : 4.98244516145833); (1.53572465152846 : 4.31899251302083)]" fixedFrom="Algorithm" fixedTo="Caller">
+ <AssociationMoniker Name="/DataClasses1DataContext/ChatRoom/ChatRoom_UserRoom" />
+ <nodes>
+ <classShapeMoniker Id="a2f065bc-f4b7-4ef5-b8fd-f951cf576e4d" />
+ <classShapeMoniker Id="eb2ab765-b058-4f92-b610-422cbe640ede" />
</nodes>
</associationConnector>
</nestedChildShapes>
Oops, something went wrong.

0 comments on commit 0fc63be

Please sign in to comment.