I am new to CSLA.I would like to know if we can do a collection or list of items from database in the businessbase instead of businesscollection base.
Thanks
Hello yh_ink,
I hope I understand you correctly. It sounds like you want a single root object that contains a collection of child objects. If so, yes. An example would be the Project class in the ProjectTracker sample application.
Let me know if I misunderstood.
Mike
hey michel,
i need single root object which contains the collection.i dont want any child objects....Where can i get a good example of the collection with in root.And would you please let me know about the sites related to csla framework.
please let me know about this...
thanks
>>i need single root object which contains the collection.i dont want any child objects
I guess I don't understand. You need a root object that contains a collection, I assume you mean a collection of business objects. Is that right? Maybe if you could explain what you need to at a higher level I'd get the picture.
As far as sites for CSLA, check out the "Other resources" link at the top of the page.
Do you have the CSLA book?
Regards,
Mike
Hey Michael,
Let me be clear in what i am trying to do.I have a web form where there is a list box.I got to get the contents of the list box.So the list box will have more data.My question is can i do that just having a businessbase alone.
I know that if i have a businesscollectionbase we can do that.But in csla can we get the collection of data be displayed just using businessbse instead of having both businessbase & businesscollectionbase.(as collection would require businessbase tooo root object)
yep i have the book,
thanks
please let me know if u understand my question
yh_ink,
I think I understand now. I'm no expert at CSLA, maybe someone else will chime in and confirm, but I think you'll need two classes. Since you'll have a collection of objects in your list box, I think you might want to have an Editable Root Collection (BusinessListBase) which holds a collection of Editable Child (BusinessBase) objects.
That's of course if you need them to be editable, otherwise it would be read only.
Mike
If this is just to populate a list box, you should use a ReadOnlyListBase-derived root object, which would contain ReadOnlyBase-derived child objects for each "row" of data.
Alternately, you might consider using the NameValueListBase, because it is specifically designed to simplify the process of getting data to load combo box and list box controls.
so using NameValueListBase i can fill the listbox with values by calling the database table.Is that a better way of doing.
Or can i have businessCollectionBase and BusinessBase instead.
thanks
Copyright (c) Marimer LLC