예제 #1
0
        public async Task <IActionResult> PutThemeDetail(int id, ThemeDetail themeDetail)
        {
            if (id != themeDetail.ThemeID)
            {
                return(BadRequest());
            }

            _context.Entry(themeDetail).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ThemeDetailExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #2
0
        public async Task <ActionResult <ThemeDetail> > PostThemeDetail(ThemeDetail themeDetail)
        {
            _context.ThemeDetail.Add(themeDetail);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetThemeDetail", new { id = themeDetail.ThemeID }, themeDetail));
        }
예제 #3
0
        public object GetOnlineThemeFile([FromBody] ThemeDetail themeDetail)
        {
            SettingHelper        settingHelper = new SettingHelper(_memoryCache);
            string               version       = settingHelper.GetCachedSettingValue(SettingKeys.Cbuilderversion);
            WebBuilderController objController = new WebBuilderController(_memoryCache);
            object               returnVaue    = objController.GetOnlineTheme(themeDetail.ThemeID, GetUsername, secureToken, version);
            WBCachehelper        wBCachehelper = new WBCachehelper(_appLifetime);

            wBCachehelper.RemoveAllCachedFile(_webHostEnvironment);
            wBCachehelper.RecycleApplicationPool();
            return(returnVaue);
        }