public YuShang.ERP.Entities.Configs.CoreConfig ToConfig(SysConfigViewModel model)
 {
     return(new YuShang.ERP.Entities.Configs.CoreConfig()
     {
         ConfigKey = model.ConfigKey,
         ConfigName = model.ConfigName,
         ConfigValue = model.ConfigValue,
         ConfigTypeKey = model.ConfigTypeKey,
         CoreConfigId = model.CoreConfigId,
     });
 }
 public SysConfigViewModel FromConfig(YuShang.ERP.Entities.Configs.CoreConfig config)
 {
     if (config != null)
     {
         SysConfigViewModel model = new SysConfigViewModel(this)
         {
             ConfigKey     = config.ConfigKey,
             ConfigName    = config.ConfigName,
             ConfigValue   = config.ConfigValue,
             ConfigTypeKey = config.ConfigTypeKey,
             CoreConfigId  = config.CoreConfigId,
         };
         return(model);
     }
     return(null);
 }