예제 #1
0
        // Get /session
        public IHttpResponse SessionTest(IHttpRequest httpRequest)
        {
            IHttpSession session = httpRequest.Session;

            if (session.GetSession(SessionDateKey) == null)
            {
                session.AddSession(SessionDateKey, DateTime.UtcNow);
            }

            return(new ViewResponse(HttpStatusCode.Ok, new SessionView(session.GetSession <DateTime>(SessionDateKey))));
        }