public static T Snapshoot<T>(this XtraForm form, T obj)
        {
            var config = new DefaultMapConfig();
            config.SetConfigName("AllField");
            var map = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<T, T>(config);
            var config2 = map.MapperImpl.MappingConfigurator as DefaultMapConfig;
            
            
            return  map.Map(obj);
        }
        public static T Restore<T>(this XtraForm form, T src, T tag)
        {
            var config = new DefaultMapConfig().IgnoreMembers<T, T>(new string[] { "EntityKey", "EntityState" });
            config.SetConfigName("NoEntityKey");
            var map = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<T, T>(config);
            var config2 = map.MapperImpl.MappingConfigurator as DefaultMapConfig;
      
            return map.Map(src,tag);
        }
View Code

相关文章:

  • 2021-07-23
  • 2021-07-06
  • 2021-08-16
  • 2022-03-08
  • 2021-06-24
  • 2021-08-27
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2021-12-31
  • 2021-09-05
  • 2021-08-23
相关资源
相似解决方案