This project is read-only.

Map nullable to non nullable only if not null?

Feb 12, 2011 at 6:48 PM


In NullableConverter

I discovered that this will fail when par is null -- this is desirable in most situations.

static Int32 ToInt32(Int64? par) { return Convert.ToInt32(par.Value); }

However, this is a merge configuration values requirement.  This time I'd actually like the mapper to leave the destinations value alone when the source is null. 

Noticed public static StaticConvertersManagerDefaultInstance

I also need to handle non primative types / enums... is there an easy way to add these in?

Is this possible?