basic (and probably silly) question about BusinessListBase

basic (and probably silly) question about BusinessListBase

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


vschaak posted on Friday, December 11, 2009

Hi,

I just started to learn CSLA and have a question about BusinessListBase (BLB):

is ist right, that BLB just works with EditableObjects as content (BusinessBase)?
My first small project is a user-managment-app for a bigger App. There, roles could be defined and permissions assigned to a role. (There is no other functionality and property than the assignment itself!) Whereas the permissionlist itself should be edited, the single permissions (content of the list) shouldnt. Thereby I thought, that I should use BusinessListBase for the list itself and ReadOnlyBase for the contained objects. This doesnt work.

Do I have to use BusinessBase for the list's-content?

Kind regards and thanks for any hint.

Volker

ajj3085 replied on Friday, December 11, 2009

Yes, you'll have to use BusinessBase as a subclass for something to be contained in a BusinessListBase.

Of course, there's no rule that a BusinessBase subclass must contain any properties which are writable (i.e., have property setters), so this will work fine for your needs and BusinessBase will provide you with Child_DeleteSelf and Child_Insert, which I imagine you'd used to add or remove the row from the table linking roles and permissions.

HTH

Andy

Copyright (c) Marimer LLC