Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2010, 09:29 AM
Registered User
 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linq Question about related entities

In my DAL, there is an entity.Select(int id) method that returns a .FirstOrDefault instance of the entity (from your code). The entity has a create user id and an update user id as properties. I need to be able to get the names associated with those id's and they are both related to the User entity.
It seems that if I look at the entity in the immediate window at a breakpoint in the DAL, I can see the entity.User collection, but when the entity gets to the entityBO, the collection has been disposed already.
How can I get the related entities to the BO? Do I need to run a separate linq query for each user? If I can attach the users to the original entity, how would I be able to associate the User with a createdId and updatedId?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Linq paging Question barakros BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 January 27th, 2010 11:48 AM
Question about LINQ maratin BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 3 January 24th, 2010 10:49 AM
Linq - A Design Question mikener LINQ 3 November 14th, 2009 10:47 AM
Comparing Performance Linq To entities and outofBand SQL updates urpcor BOOK: Professional ADO.NET 3.5 with LINQ and the Entity Framework ISBN: 978-0-470-22988-0 4 September 28th, 2009 06:22 AM
LINQ question thangxii BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 July 6th, 2008 03:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.