I have a class A
containing a collection of class B
. This last class is very heavy and, for a new module I'm working in, I just need a couple of fields of it.
For improving performance when loading entities from SQL server using nhibernate I'd like to create a lite version of this class for using in this module I'm developing (class BLite
).
This BLite
class will be used on collections and many-to-one relations. I know I could create a separated mapping for this new class containing just the fields I need but, if possible, I'd like to avoid this (using components or similar feature).
Is it possible to use a "lite" version of a class without creating an extra mapping?