Object to Object Mapping Utility

后端 未结 4 1198
名媛妹妹
名媛妹妹 2021-01-01 01:50

I like to cleanly separate public and domain objects (so, nHibernate isn\'t going to help here) from each other which ends up forcing me to write a lot of code to m

4条回答
  •  醉话见心
    2021-01-01 02:30

    There is also an interesting project called Otis. Below is the example *.otis.xml mapping taken from the documentation page:

     
    
    
        
        
        
        
        
        
                 
            
         
        
        
        
                     
    
    

    To read the mapping files from the assembly:

    // configure the new Configuration object using metadata of types in the current assembly
    Configuration cfg = new Configuration();            // instantiate a new Configuration, one per application is needed
    cfg.AddAssembly(Assembly.GetExecutingAssembly());   // initialize it
    

    Hmm, where have I seen it before? ;)

提交回复
热议问题