예제 #1
0
        public HomePageConfig GetHomePageConfig(Config entity)
        {
            HomePageConfig hpConf = null;

            if (entity.HomeConfig != null)
            {
                hpConf = JsonConvert.DeserializeObject <HomePageConfig>(entity.HomeConfig);
            }
            if (hpConf == null)
            {
                hpConf = new HomePageConfig();
            }
            return(hpConf);
        }
예제 #2
0
 public void UpdateHomePageConfig(Config entity, HomePageConfig model)
 {
     entity.HomeConfig = JsonConvert.SerializeObject(model);
 }