473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using interface effectively

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

--
--

Mar 26 '07 #1
4 949
On Mar 26, 1:11 pm, "Flomo Togba Kwele" <F...@community.nospamwrote:
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

Mar 26 '07 #2
CodeSmith

--

Mar 26 '07 #3
Flomo Togba Kwele wrote:
CodeSmith
Can't you change the properties to Overridable in the templates, then?
(not that I know squat about CodeSmith).

HTH.

Regards,

Branco.

Mar 26 '07 #4
Branco,

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

Thanks for the suggestion.

--

Mar 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
9585
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
0
1324
by: news_mail_jpa | last post by:
Hi! I'd like to implement a private interface and I have the choices mentioned in the subject. The implementation using private inheritance is probably cleaner but it also adds some space and...
1
1882
by: phoenix | last post by:
Hello, I guess I'm missing to logic behind the limitation or I'm doing something wrong (most likely). I have the following interface and class public interface IRBSPParser { void Parser(byte...
3
8865
by: Phill | last post by:
When should you use an interface over a delegate? Like if you have a class that needs to sort various types of objects. Should it use a delegate to do the sorting or require that the objects...
11
2195
by: Antony | last post by:
I know this sounds stupid but I am going to carry on anyway. I want to create an interface that implements all methods of a form, plus another one or two. But I need to know if there is an...
2
268
by: psandler70 | last post by:
All, This might be a stupid question. When defining an interface, is it possible to force the class that implements it to support a property/method with the same name, but not force a...
52
20810
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
11
9383
by: Wojciech Gryc | last post by:
Hi, I recently started using Python and am extremely happy with how productive it's made me, even as a new user. I'm hoping to continue using the language for my research, and have come across a...
9
1691
by: Tony | last post by:
Hello! The keword abstract and sealed are not allowed in interfaces. I can understand that abstract is not allowed because an interface is completely abstract and contains no implementation. ...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.