Fluent NHibernate and automapping generic types
I'm automapping most of my model, but have a problem with generics.
I've got ValueContainer<TValue>
, and I make it abstract so that it
doesn't throw an exception during automapping. Next, I have to create
classes like StringValueContainer
just to make it mapped. Needless to
say, I don't like this approach, since I'm perfectly happy with the
generic classes.
So, the question is, ho开发者_如何转开发w do I manually map classes like
ValueContainer<string>
that inherit from an automapped class? I tried
to fluently configure the subclass via SubclassMap, but that,
predictably, failed.
Just to clarify: I've got StringValueContainer: ValueContainer<string>
, but the StringValueContainer
class doesn't add any value except for automapping, so I'm wondering if it's possible to do it in a cleaner way.
精彩评论