Ejemplo n.º 1
0
 /// <summary>
 /// Registers mapping for TFor from TFrom to TTo.
 /// The mapping is only valid for TFor.
 /// </summary>
 public static void RegisterMapping <TFor, TFrom, TTo>(this ModelMapper mapper)
 {
     mapper.RegisterMapping(typeof(TFor), typeof(TFrom), typeof(TTo));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers mapping from TInterface to instance.
 /// The mapping is only valid for this model class and subclasses.
 /// </summary>
 public static void RegisterMapping <TInterface>(this ModelMapper mapper, TInterface instance)
 {
     mapper.RegisterMapping(typeof(TInterface), instance);
 }