Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Typed List or RetrievalProcedure?
 

Pages: 1
LLBLGen Pro Runtime Framework
Typed List or RetrievalProcedure?
Page:1/1 

  Print all messages in this thread  
Poster Message
bonder
User



Location:

Joined on:
23-Sep-2003 05:05:17
Posted:
36 posts
# Posted on: 17-Apr-2004 04:33:07.  
Hi,

I am trying to figure out if it is better (for performance and code readability reasons) to do a query using a typed list or a retrieval procedure. Here is my situation:

I have a number of Orders that I want to pull out of the database and bind to a datagrid. For each Order, I need the following information:

  • Its OrderNumber (pretty easy, this is simply an attribute)
  • The Primary Buyer Full Name (a bit harder; each order can have multiple buyers, but one is marked as primary in a relationship table called OrderBuyer which links an Order with any number of Contact rows)
  • The Seller Full Name (about the same scenario, except that since there is no concept of a "primary seller" we use the first seller listed by a SortOrder attribute)
  • Current Stage of the Order (eg, "Open, Pending, Closing, Closed"; this is determined by getting the first entity from the Order's Task collection that is marked "Not Completed" and referencing it's WorkFlowStage property)
    [/list]


    My big questions are these:

  • Is this query too difficult for a typed list? My concern is that both sellers and buyers exist in the Contact collection.
  • Is there an even better way to do this?

Thanks in advance,

--Bruce
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37645 posts
# Posted on: 17-Apr-2004 11:09:25.  
If the 2 names are retrieved from the same table, a typed list is indeed out of the question as it has to join twice with the same table. (I really really really hate it that it can't be done now, trust me on that, if I had the time to fix it NOW I'd do it, but it has to wait till the next runtime revision.)

For performance reasons, I don't think it would have mattered much.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
bonder
User



Location:

Joined on:
23-Sep-2003 05:05:17
Posted:
36 posts
# Posted on: 19-Apr-2004 16:50:30.  
Otis wrote:
If the 2 names are retrieved from the same table, a typed list is indeed out of the question as it has to join twice with the same table. (I really really really hate it that it can't be done now, trust me on that, if I had the time to fix it NOW I'd do it, but it has to wait till the next runtime revision.)

For performance reasons, I don't think it would have mattered much.


Thanks for the quick answer (they're all quick answers with you!). Regular Smiley

For the time being we will code a sproc to handle this. When you get around to this enhancement, we'll convert our code.

Thanks!

--Bruce
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.