ajj3085:The only use for ERLB is in a rich application (WinForms or WPF) where you want each row to save itself to the database as the user leaves the row, because each row can be modified independant of every other row (that is, each row is a Root object).
Yes, you are fine to use BLB for both objects. As a matter
of fact, I have never used ERLB because I always use single save button for
entire set of data on a single form/control. ERLB does not work for this.
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: Valentin_Valve
[mailto:cslanet@lhotka.net]
Sent: Saturday, May 10, 2008 1:53 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] EditableRootListBase or BusinessListBase
ajj3085:
The only use for ERLB is in a rich application (WinForms or WPF) where you want each row to save itself to the database as the user leaves the row, because each row can be modified independant of every other row (that is, each row is a Root object).
Thanks for quick response.
I think I get the idea. I'm currently working on a form (WinForms app) where I
have two panes (upper is master, lower is detail, standard approach). I'm using
BLBs for both panes, because I want everything to be saved upon form closing in
one transaction. Is this ok to NOT use ERLB in upper (master) pane here?
Thank you
~Valentin
Excellent. Reading this post I realized that while I was using BusinesBaseList what I really need is EditableRootListBase since this is exactly what I am doing.
So, I tried to switch to EditableRootListBase and found two things. One is good and another is not so good.
1. Good thing. In my approach I had to call ISavable.Save manually, and not it's called automatically when ApplyEdit is called
2. Bad thing. We are working with local database, and our ApplicationContext.AutoCloneOnUpdate method property is set to fase, so no cloning. Now, I cannot avoid that cloning since that what EditableRootListBase does.
So, the question is why would I need to clone with local database? Can I avoid it somehow?
ajj3085:The only use for ERLB is in a rich application (WinForms or WPF) where you want each row to save itself to the database as the user leaves the row, because each row can be modified independant of every other row (that is, each row is a Root object).
The only reason is performance. Serializing is comparably heavy operation to be used just to know what can be wrong should I decide to switch to remote data portal. I will think about that, but now I am inclined to remove cloning from EditableRootListBase.
BTW, if I really decide to move remote data portal, the cloning will still be there, right. Which will be absolutely useless since remote data portal will serialize the object late anyway.
Copyright (c) Marimer LLC