AdminControllerBase.cs 638 B

123456789101112131415161718192021
  1. using CZFW.CMS.Admin;
  2. using CZFW.Framework;
  3. using CZFW.Framework.Model;
  4. using CZFW.MDB.Util;
  5. using Microsoft.AspNetCore.Http;
  6. using Microsoft.AspNetCore.Mvc.Filters;
  7. using System.Threading.Tasks;
  8. namespace CZFW.CMS.Admin
  9. {
  10. public class AdminControllerBase : AuthedControllerBase
  11. {
  12. public SiteCacheModel Site { get; set; }
  13. public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
  14. {
  15. Site = GetSession<SiteCacheModel>(CMSAdminConstant.CURRENT_SITE_SESSION_NAME);
  16. return base.OnActionExecutionAsync(context, next);
  17. }
  18. }
  19. }