Root or child?

Root or child?

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


tchimev posted on Saturday, May 10, 2008

Hello,

I'm new to CSLA and trying to build my first simple project using CSLA.
So I have a class Product which inherits from BusinessBase. And another class ProductList which inherits from BusinessListBase.
The ProductList is bind to a DataGridView in Windows form, and I want to insert/update/delete products in the grid, but I can not decide how to implement my Product as a root object or as a child of ProductList.
Do I have two root object or one of them is child?
Which is the correct way ot solve this?

Thank you.

sergeyb replied on Saturday, May 10, 2008

Product should be a child of Product List.

I.e. ProductList is BLB/root (of ProductList, Product), Product is a BB/child (of Product) .

 

Sergey Barskiy

Senior Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: tchimev [mailto:cslanet@lhotka.net]
Sent: Saturday, May 10, 2008 4:13 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Root or child?

 

Hello,

I'm new to CSLA and trying to build my first simple project using CSLA.
So I have a class Product which inherits from BusinessBase. And another class ProductList which inherits from BusinessListBase.
The ProductList is bind to a DataGridView in Windows form, and I want to insert/update/delete products in the grid, but I can not decide how to implement my Product as a root object or as a child of ProductList.
Do I have two root object or one of them is child?
Which is the correct way ot solve this?

Thank you.



tchimev replied on Monday, May 12, 2008

Thank you for your answer, but can you explain why.
Is it always like that when you have an object and a list of that object?

thank you

EDIT: I think I found the answer:  Defining parent and child objects

Copyright (c) Marimer LLC