Getting a result with a live connection

Posts   
 
    
alphus
User
Posts: 4
Joined: 17-May-2007
# Posted on: 17-May-2007 23:17:29   

Hi,

I'm new to LLBLGen (loving it). I searched the forum, but I can't find any information on this. I need to know if you can retrieve a set of enumerable entities with an iterator that has a live connection to the database. Kind of like a datareader, so that you can read results of a query, but instead of returning rows, it would return entities. If this doesn't exist, is there an easy way of implementing it?

The reason is the underlying data is very large, and I need to run queries in a separate thread and have them report on their status.

Thanks all,

btw, LLBLGen is my hero wink

alphus
User
Posts: 4
Joined: 17-May-2007
# Posted on: 17-May-2007 23:20:35   

Whoops, Forgot to list some other information disappointed Using LLBLGen Version 2.0.0.0 Final with SQL Server 2005

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 18-May-2007 01:43:18   

Do you mean an EntityCollection? (not just a single entity)

yes you can. depending on whether you're using the adapter or SS model will determine the exact syntax. search the help file for EntityCollection.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 21-May-2007 10:46:10   

Either use paging when fetching entities, or use a datareader fetch, so you then get a datareader returned when you pass in a set of fields and for example a filter. The syntax differs a bit between selfservicing and adapter, though there's enough info on them in the docs: Using the generated code -> Adapter/SelfServicing -> Fetching datareaders and projections simple_smile

btw, LLBLGen is my hero

smile

Frans Bouma | Lead developer LLBLGen Pro