Fetch Entity

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 24-Jan-2011 06:18:49   

LLBL GEN 3.0 Adapter .NET framework 2.0

when i use say customer.fetchentity(32) is there a way to find out number of records returned?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 24-Jan-2011 09:53:05   

customer.fetchentity(32)

What's this?

Either you are fetching an entity using:

var customer  = new CustomerEntity(32);
adapter.FetchEntity(customer);

And then you can check: customer.IsNew, to see if an entity was fetched or not.

Or you are fetching a collection

var customers  = new EntityCollection<CustomerEntity>();
adapter.FetchEntityCollection(customers, filter);

And then you can check on customers.Count, to get the number of entities fetched.

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 24-Jan-2011 09:56:08   

Walaa wrote:

customer.fetchentity(32)

What's this?

Either you are fetching an entity using:

var customer  = new CustomerEntity(32);
adapter.FetchEntity(customer);

And then you can check: customer.IsNew, to see if an entity was fetched or not.

Or you are fetching a collection

var customers  = new EntityCollection<CustomerEntity>();
adapter.FetchEntityCollection(customers, filter);

And then you can check on customers.Count, to get the number of entities fetched.

Thanks