Map() public method

Maps the type wrapped by the ReflectionWrappers.TypeWrapper to a ClassDef. NNB: This only maps this Class it will not try to Create or map relationships from related classes. This method is primarily for testing etc normally you would be mapping using the AllClassesAutoMapper
public Map ( ) : IClassDef
return IClassDef
Ejemplo n.º 1
0
        /// <summary>
        /// Maps the Class of <paramref name="typeWrapper"/> to a ClassDef.
        /// Note_ this will not create the reverse relationships on
        /// the Related Class if they are required. If you require reverse relationships to be set up then please
        /// use the <see cref="AllClassesAutoMapper"/>
        /// </summary>
        /// <param name="typeWrapper"></param>
        /// <returns></returns>
        public static IClassDef MapClass(this TypeWrapper typeWrapper)
        {
            if (typeWrapper.IsNull())
            {
                return(null);
            }
            var autoMapper = new ClassAutoMapper(typeWrapper);

            return(autoMapper.Map());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Maps the Class of <paramref name="typeWrapper"/> to a ClassDef.
 /// Note_ this will not create the reverse relationships on
 /// the Related Class if they are required. If you require reverse relationships to be set up then please
 /// use the <see cref="AllClassesAutoMapper"/>
 /// </summary>
 /// <param name="typeWrapper"></param>
 /// <returns></returns>
 public static IClassDef MapClass(this TypeWrapper typeWrapper)
 {
     if (typeWrapper.IsNull()) return null;
     var autoMapper = new ClassAutoMapper(typeWrapper);
     return autoMapper.Map();
 }