Abstract Business Object


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I would like to have a Base BO from which I inherit a bunch of similar BOs that just have different properties, and attach to different tables in the db.  I would like to have a set of MustOverride type properties, so that I can have sort of a template for the inherited BOs.  I have done this, which causes the Base class to be abstract.  Then,  in the inherited BO, I change the Inherits MicroFour.StrataFrame.Business.BusinessLayer to Inherits BBS.Biz.Base.TableBO in my inherited class (including the partial).  Everything works great except that when I want to pull up the design view for the Inherited BO it gives me this error:

The designer must create an instance of type 'BBS.Biz.Base.TableBO' but it cannot because the type is declared as abstract.

Is there any way to get around this, or is there a better way to accomplish what I'm trying to do here?

Reply
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
An interface is fine for properties that I want to have set for each inherited BO.  However, what if I wanted to do something like have the New always call a certain Method to Fill the object?  I can't accomplish this through an interface.  That's why I was looking at an abstract class instead.  Is there anyway I can have a BO as a base with some basic methods the way I'd like them and have other BO's inherit those methods?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search