Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:53 AM.


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