Using interface effectively

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
 
R

rowe_newsgroups

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
 
B

Branco Medeiros

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.
 
F

Flomo Togba Kwele

Branco,

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

Thanks for the suggestion.



--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top