<p>I have one table "orders" with a foreing key "ProductID".</p>

<p>I want to show the orders in a grid with the <strong>product name</strong>, without <strong>LazyLoad</strong> for better performance, but I if use <strong>DataLoadOptions</strong> it retrieves <strong>all</strong> Product fields, which seams like a <strong>overkill</strong>.</p>

<p>Is there a way to retrieve <strong>only</strong> the Product name in the first query?
Can I set some attribute in the DBML?</p>

<p>In this <a href="http://visualstudiomagazine.com/listings/list.aspx?id=566" rel="nofollow noreferrer">table</a> says that "Foreign-key values" are "Visible" in Linq To SQL, but don't know what this means.</p>

<p><strong>Edit</strong>: Changed the title, because I'm not really sure the there is no solution.<br>
Can't believe no one has the same problem, it is a very common scenario.</p>

[{'answer_id': 29069, 'author': 'Scott Wisniewski', 'author_id': 1737192, 'author_profile': 'https://Stackoverflow.com/users/1737192', 'pm_score': 0, 'selected': False, 'text': '<p>If you select only the columns you want in the linq query, and then call .ToList() on the query, it will be immedietly executed, and will only bring back the columns you are interested in. For example if you do this:</p>\n\n<pre><code>var q = from p in dataContext.products select p.ProductName;\nvar results = q.ToList();\n</code></pre>\n\n<p>You will get back a list of product names stored in results, and when the query executes on the server it will only bring back the ProductName column.</p>\n'}, {'answer_id': 29119, 'author': 'liammclennan', 'author_id': 2785, 'author_profile': 'https://Stackoverflow.com/users/2785', 'pm_score': 3, 'selected': False, 'text': '<p>What you are asking for is a level of optimisation the linq-to-sql does not provide. I think your best bet is to create a query that returns exactly the data you want, possibly as an anonymous type:</p>\n\n<pre><code>from order in DB.GetTable&lt;Orders&gt;()\njoin product in DB.GetTable&lt;Products&gt;()\non order.ProductID = product.ID\nselect new { ID = order.ID, Name = order.Name, ProductName = product.Name };\n</code></pre>\n'}, {'answer_id': 425518, 'author': 'Eduardo Molteni', 'author_id': 2385, 'author_profile': 'https://Stackoverflow.com/users/2385', 'pm_score': 1, 'selected': True, 'text': '<p>I get the solution in this other question <a href="https://stackoverflow.com/questions/381049/which-net-orm-can-deal-with-this-scenario#381084">Which .net ORM can deal with this scenario</a>, that is related to the <strong>liammclennan</strong> answer but more clear (maybe the question was more clear too)</p>\n'}]
['https://Stackoverflow.com/questions/29040', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2385/']