CSLA .NET

From Rockford Lhotka's Expert C# 2005 and VB 2005 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

Root or child?

Last post 05-12-2008, 1:41 AM by tchimev. 2 replies.
Sort Posts: Previous Next
  •  05-10-2008, 3:12 AM 23480

    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.

  •  05-10-2008, 7:50 AM 23482 in reply to 23480

    RE: Root or child?

    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.



  •  05-12-2008, 1:41 AM 23490 in reply to 23482

    Re: RE: Root or child?

    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

View as RSS news feed in XML

Please contact Magenic for your .NET consulting and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems