Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Refresh EntityCollection from database
 

Pages: 1
LLBLGen Pro Runtime Framework
Refresh EntityCollection from database
Page:1/1 

  Print all messages in this thread  
Poster Message
Rosacek
User



Location:
CZ
Joined on:
18-Mar-2012 18:02:44
Posted:
133 posts
# Posted on: 13-Sep-2012 21:58:53.  
Hi,
what is the right way to refresh entitycollection from database?

When simply use following code, only new records from DB are added to entitycollection, but updated records are not affecting my entity collection.

Code:

Using adapter As New DataAccessAdapter()
         adapter.FetchEntityCollection(ecCustomers, Nothing)
End Using


It works fine if I call ecCustomers.Clear() first, and then fetch
Code:

Using adapter As New DataAccessAdapter()
         ecCustomers.Clear()
         adapter.FetchEntityCollection(ecCustomers, Nothing)
End Using


Is there any better way how to refresh from DB?
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8086 posts
# Posted on: 14-Sep-2012 06:55:22.  
Clearing the collection is a good idea actually, also because may be elements that are not anymore in DB.

David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


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

Version: 2.1.12172008 Final.