This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello. I have problems with my winforms application related to the scoping of Unit of Works. With this there is no need to create so many UOWs becasue a UOW could update entities from DB. Thank you. |
|
|
Hello. Experimenting I changed a little the code and now it works much better. The form creates an UOW that lasts the entire life of the form. First time I read entities from this UOW. When reading updated data (manually presssing Refresh button or automatically using the background thread) I create a new UOW, read entities and dispose the UOW inmediately. Next, I detach the old entities from the form's UOW and attach the new entities. I am manually coding the 'merge'. In this way my entities always have a valid UOW and the cache of this UOW is maintained.
|
|
|
Hello Enrique, It sounds like you've found an acceptable solution, but for future reference I thought I'd mention that JD posted some more tips about this a couple of months back, which you may find interesting: http://www.mindscape.co.nz/blog/index.php/2009/08/19/tips-for-rich-client-development/ |
|