views:

49

answers:

1

How can I add a property to a model that was created in an other assembly. We have many applications ranging from desktop applications to web applications so I have class library with each model needed along with their relationships. I am very easily able to reference my class library and query what is needed. However, due to the fact that I am not modelling every field in each table (some tables have upwards of 30+ fields).

How can I extend the original model to give it more properties? Or should I simply model everything in the tables that I am using? My original thinking was that it would be nice if the developer could extend any model to his will to fit his project needs.

+2  A: 

you may iherit your own class of a new assembly form base class of old assembly if you have a reference to the old one and that class is public.

Arseny
Is there any way to use something to partial classes? I know you can't use partial classes from different assemblies but is it possible to mimic that effect using another method?
Mike
@wb Are you talking about GUI components where their classes splitted on 2 partial ones?
Arseny