I think this is related more directly to NH than Automapper so Im
posting here first...
Im trying to use Automapper to convert lazy loaded types BUT THE CATCH
IS that I must convert using properties from the source. Im not sure
how to accomplish testing if the lazy-loaded type 'is null' :
Pseudo:
if ( TSource ! null )
return new TDest(TSource.X ..)
else
return null
Impl:
CreateMap<NH.Entities.DriverBase, Execution.Entities.DriverBase>()
.ConvertUsing(x => x != null ?
new DriverBase(x.Id, x.EmployeeId, x....)
: null);
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.