Esempio n. 1
0
        public async Task <ActionResult> Index(int id)
        {
            var misc = await MiscService.GetFromCacheAsync(m => m.Id == id) ?? throw new NotFoundException("页面未找到");

            misc.ModifyDate = misc.ModifyDate.ToTimeZone(HttpContext.Session.Get <string>(SessionKey.TimeZone));
            misc.PostDate   = misc.PostDate.ToTimeZone(HttpContext.Session.Get <string>(SessionKey.TimeZone));
            return(View(misc));
        }