I can see the problem, although I'm hoping I'll be able to avoid it (I'll
need to do a quick test first). My idea was to use an interface for my
data layer classes so I can control from my business layer which data
layer class to use.
   The implementation of the data layer class would know what type to use
(instead of T).

   The plan is to create different implementations of the interface (one
per class requiring a data layer class, this way I can control which data
layer to use from my business layer.

The idea sounds good on paper but as you suggest, it might end up been too
complicated to maintain or unworkable due to generics killing the benefits
from the interface. Nevertheless thanks for the pointer about how to
create the generic type and also thanks for the warning about mixing
generics with interfaces.


Regards,
Yago Alvarado

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to