Does a child of a ReadOnlyListBase need to be a ReadOnlyBase

Does a child of a ReadOnlyListBase need to be a ReadOnlyBase

Old forum URL: forums.lhotka.net/forums/t/5573.aspx


Shaun posted on Friday, October 10, 2008

I was wondering if it is possible to create a ReadOnlyListBase of a POCO?

Thanks

Shaun

rsbaker0 replied on Saturday, October 11, 2008

Yes, I have put editable objects into ROLB's before rather than creating a separate ROB class, mainly out of laziness.

I'm not sure it's a good idea, though. ROB's are lightweight classes by comparison, so I think you're losing most of the advantage of using a ROLB.

Another similar technique is to just use a BLB or ERLB class, but turn off editing in the UI. Again, though, I think this is missing the point -- having your BO's enforce the behavior while the UI can be agnostic.

As I get better with our code generator I'll probably switch over to dedicated classes.

Copyright (c) Marimer LLC