I have a class in my domain model called
JobPlan
this class is stored / retrieved via ORM and used on various places.
I am creating a view that shows a treelist of this class and the treelist needs this class to implement certain interface (the interface comes from a 3rd party lib). Adding the interface to the JobPlan class will however force all assemblies that use this class to reference the third party control as well. This is not ideal.
I am thinking of having a
JobPlanPresenter
that would simply inherit JobPlan and implement the methods for the interface. This would lead me to a problem of how to then get JobPlan (parent) transformed to JobPlanPresenter child. I could obviously create a transformer class that would simply copy all the fields from the parent class to the child class, but that seems as a quite ugly hack to me, that would also kill all the updates on the original objects etc.
Do you think there is another way ? Am I missing something completely ?