<p>I have an entity that contains many of itself, how do I map this in LINQ to SQl such that it does not do an infinite loop of getting e1 then all its children then their parents (e1) then its children and repeat? Now I know I can do this if I set the child property to false, however that is the most important property (don't really care about the parent). Is there a way to have it do lazy loading? Would that even fix it?</p>

[{'answer_id': 53058, 'author': 'Tobi', 'author_id': 5422, 'author_profile': 'https://Stackoverflow.com/users/5422', 'pm_score': 0, 'selected': False, 'text': '<p>As far as I know LINQ to SQL does lazy loading by default. And even if it doesn\'t, I\'m pretty sure the MS guys used some kind of <a href="http://en.wikipedia.org/wiki/Identity_map" rel="nofollow noreferrer">identity map</a> to ensure every record is loaded only once per DataContext.</p>\n\n<p>Did you experience it getting stuck in a loop in practice?</p>\n'}, {'answer_id': 53060, 'author': 'Mark Cidade', 'author_id': 1659, 'author_profile': 'https://Stackoverflow.com/users/1659', 'pm_score': 1, 'selected': False, 'text': '<p>In the designer, select a property on an entity in the diagram, and in the <em>Code Generation</em> section in the properties window, set <strong>Delay Loaded</strong> to <em>True</em> .</p>\n\n<p>See <a href="http://www.davidhayden.com/blog/dave/archive/2007/08/05/LINQToSQLLazyLoadingPropertiesSpecifyingPreFetchWhenNeededPerformance.aspx" rel="nofollow noreferrer">this blog post</a>.</p>\n'}, {'answer_id': 53156, 'author': 'Gabe Anzelini', 'author_id': 5236, 'author_profile': 'https://Stackoverflow.com/users/5236', 'pm_score': -1, 'selected': False, 'text': '<p>This site is not good for my pre-existing biases, turns out <em>this one</em> was an ill-configured route not lazy/eager loading</p>\n'}]
['https://Stackoverflow.com/questions/53045', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5236/']