<p>I have a relationship between two entities (e1 and e2) and e1 has a collection of e2, however I have a similar relationship set up between (e2 and e3), yet e2 does not contain a collection of e3's, any reason why this would happen? Anything I can post to make this easier to figure out?</p>

<p>Edit: I just noticed that the relationship between e1 and e2 is solid and between e2 and e3 is dotted, what causes that? Is it related?</p>

[{'answer_id': 50957, 'author': 'Gabe Anzelini', 'author_id': 5236, 'author_profile': 'https://Stackoverflow.com/users/5236', 'pm_score': 0, 'selected': False, 'text': '<p>the FK_Contraints are set up like this:</p>\n\n<p>ALTER TABLE [dbo].[e2] WITH CHECK ADD CONSTRAINT [FK_e2_e1] FOREIGN KEY([E1Id]) REFERENCES [dbo].[e1] ([Id])</p>\n\n<p>ALTER TABLE [dbo].[e3] WITH CHECK ADD CONSTRAINT [FK_e3_e2] FOREIGN KEY([E2Id]) REFERENCES [dbo].[e2] ([Id])</p>\n\n<p>is this what you were asking for?</p>\n'}, {'answer_id': 175736, 'author': 'KyleLanser', 'author_id': 12923, 'author_profile': 'https://Stackoverflow.com/users/12923', 'pm_score': 2, 'selected': False, 'text': '<p><strong>Using this setup, everything worked.</strong>  </p>\n\n<p><em>1) LINQ to SQL Query, 2) DB Tables, 3) LINQ to SQL Data Model in VS.NET 2008</em></p>\n\n<p><strong>1 - LINQ to SQL Query</strong></p>\n\n<pre><code>DataClasses1DataContext db = new DataClasses1DataContext();\n\nvar results = from threes in db.tableThrees\n    join twos in db.tableTwos on threes.fk_tableTwo equals twos.id\n    join ones in db.tableOnes on twos.fk_tableOne equals ones.id\n    select new { ones, twos, threes };\n</code></pre>\n\n<p><strong>2 - Database Scripts</strong></p>\n\n<pre><code>--Table One\nCREATE TABLE tableOne(\n    [id] [int] IDENTITY(1,1) NOT NULL,\n    [value] [nvarchar](50)  NULL,\n CONSTRAINT [PK_tableOne] PRIMARY KEY CLUSTERED \n    ( [id] ASC ) WITH ( \n    PAD_INDEX  = OFF, \n     STATISTICS_NORECOMPUTE  = OFF, \n     IGNORE_DUP_KEY = OFF, \n     ALLOW_ROW_LOCKS  = ON, \n     ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]\n    ) ON [PRIMARY];\n\n--Table Two\nCREATE TABLE tableTwo(\n    [id] [int] IDENTITY(1,1) NOT NULL,\n    [value] [nvarchar](50)  NULL,\n    [fk_tableOne] [int] NOT NULL,\nCONSTRAINT [PK_tableTwo] PRIMARY KEY CLUSTERED \n    ( [id] ASC ) WITH (\n    PAD_INDEX  = OFF, \n    STATISTICS_NORECOMPUTE  = OFF, \n    IGNORE_DUP_KEY = OFF,\n    ALLOW_ROW_LOCKS  = ON, \n    ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]\n    ) ON [PRIMARY];\n\nALTER TABLE tableTwo WITH CHECK     \n    ADD CONSTRAINT [FK_tableTwo_tableOne]   \n    FOREIGN KEY([fk_tableOne])\n    REFERENCES tableOne ([id]);\n\nALTER TABLE tableTwo CHECK CONSTRAINT [FK_tableTwo_tableOne];\n\n\n--Table Three\nCREATE TABLE tableThree(\n    [id] [int] IDENTITY(1,1) NOT NULL,\n    [value] [nvarchar](50) NULL,\n    [fk_tableTwo] [int] NOT NULL,\nCONSTRAINT [PK_tableThree] PRIMARY KEY CLUSTERED \n    ([id] ASC ) WITH (\n    PAD_INDEX  = OFF, \n    STATISTICS_NORECOMPUTE  = OFF, \n    IGNORE_DUP_KEY = OFF, \n    ALLOW_ROW_LOCKS  = ON, \n    ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]\n    ) ON [PRIMARY];\n\nALTER TABLE tableThree WITH CHECK \n    ADD CONSTRAINT [FK_tableThree_tableTwo] \n    FOREIGN KEY([fk_tableTwo])\n    REFERENCES tableTwo ([id]);\n\nALTER TABLE tableThree CHECK CONSTRAINT [FK_tableThree_tableTwo];\n</code></pre>\n\n<p><strong>3 - LINQ to SQL Data Model in Visual Studio</strong>  </p>\n\n<p><a href="http://i478.photobucket.com/albums/rr148/KyleLanser/ThreeLevelHierarchy.png" rel="nofollow noreferrer">alt text http://i478.photobucket.com/albums/rr148/KyleLanser/ThreeLevelHierarchy.png</a>  </p>\n'}]
['https://Stackoverflow.com/questions/50853', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5236/']