Print Page | Close Window

Implementing Funhouse-Style BaseEntity Inheritance in Your Application

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=77
Printed Date: 03-Feb-2026 at 7:40pm


Topic: Implementing Funhouse-Style BaseEntity Inheritance in Your Application
Posted By: Customer
Subject: Implementing Funhouse-Style BaseEntity Inheritance in Your Application
Date Posted: 06-Jun-2007 at 5:14pm

Question:

Questions about Funhouse:

1.        Do I have to create then CommonEntity.cs manually? and then create BaseEntity.cs with the tool and manually inherit from CommonEntity?

2.        Will be the tool smart enough to preserve my changes (inheritance ) the next time when I generate the clases again?

3.        How do  I create CommonEntityDataRow.cs ? manually




Replies:
Posted By: IdeaBlade
Date Posted: 06-Jun-2007 at 5:16pm

Answer:

1.        You'll create (or copy) CommonEntity.cs manually.  You'll create BaseEntity with the OM tool.  You'll manually change the inheritance to inherit from CommonEntity.

2.        I am not sure about this one.

3.        A CommonEntityDataRow.cs is not required.  We just used it to show that it could be done.

Here is some additional information for you on the questions that you asked in September.  One of the engineers on our team, Jason Kwan, wrote a demo app that shows how to use Abstract class BaseEntity and a separate CommonEntity class that BaseEntity inherits from.  So CommonEntity can provide common functions that all inherited objects can use to perform common task.  In this case, we simply modified Model’s business object id to a different Common ID.  Similar functionality can also be provided through the Abstract Class BaseEntity – BaseID.




Print Page | Close Window