Using interface effectively

  • Thread starter Thread starter Flomo Togba Kwele
  • Start date Start date
F

Flomo Togba Kwele

I have a class which is derived and generated automatically from the database.
Whenever I change the definition of the table, I regenerate the class.

I need to derive another class based on the one above. I have added a few
fields and properties, extending its function.

I do not want to change the original class by hand, since it will be
over-written when I regenerate.

I need to implement an interface on the derived class. The interface effects
some, but not all, of the properties. In order to implement an inherited
property, it seems I must change the property of the base class to Overridable.
But Overridable will be removed when I regenerate the base class and the
derived class will break.

Is there another approach to solve this problem?

Thanks, Flomo
 
I have a class which is derived and generated automatically from the database.
Whenever I change the definition of the table, I regenerate the class.

I need to derive another class based on the one above. I have added a few
fields and properties, extending its function.

I do not want to change the original class by hand, since it will be
over-written when I regenerate.

I need to implement an interface on the derived class. The interface effects
some, but not all, of the properties. In order to implement an inherited
property, it seems I must change the property of the base class to Overridable.
But Overridable will be removed when I regenerate the base class and the
derived class will break.

Is there another approach to solve this problem?

Thanks, Flomo

How exactly is the class being generated from the database?

Thanks,

Seth Rowe
 
Flomo said:
CodeSmith

Can't you change the properties to Overridable in the templates, then?
(not that I know squat about CodeSmith).

HTH.

Regards,

Branco.
 
Branco,

Yes, I could do that, but then all properties would be Overridable. I guess
that's OK.

Thanks for the suggestion.



--
 
Back
Top