开发人员必备工具 :OO Mapper

     昨天看了dudu 老大的文章博客园现代化建设——AutoMapper有感便推荐一下OOMapper 组件,诚然OOMapper 组件是站在巨人的肩膀上,如AutoMapper,EmitMapper,以及Codeplex上所有类似组件上都做了借鉴,也重新发明了轮子,但是在发明轮子的过程中个人的积累也在提升。

  OO MapperNLite组件库中的一个组件,它是一个对象到对象转换的映射工具,常常用于把复杂的对象转化为DTO对象。

      OO Mapper 支持以下映射功能:

  •        Any -> String 
  •        Primitive -> Enum 
  •        Enum  -> Primitive
  •        Nullable -> Primitive 
  •        Primitive -> Nullable 
  •        Nullable -> Nullable 
  •        Primitive  -> Primitive 
  •        null ->  Primitive 
  •        Dictionary -> Dictionary
  •        Class -> Dictionary
  •        Dictionary -> Class
  •        DataReader -> List
  •        DataReader -> DataTable
  •        DataTable -> List
  •        List -> DataTable
  •        ListSource -> List
  •        List -> ListSource
  •        List -> List (任意集合类型,任意集合元素)
  •        Class -> Class 

下一篇将会介绍详细使用方法。

posted @ 2011-04-08 11:45  风云  阅读(7050)  评论(20编辑  收藏  举报