예제 #1
0
        public void CloseSession(string sessionKey, SessionStatus status)
        {
            if (string.IsNullOrEmpty(sessionKey))
                throw new ArgumentException();

            var connection = new SqlConnection(ConnectionString);
            var cmd = new SqlCommand("dbo.CloseSession", connection)
            {CommandType = System.Data.CommandType.StoredProcedure};

            cmd.Parameters.Add(new SqlParameter("SessionKey", System.Data.SqlDbType.NVarChar)).Value = sessionKey;
            cmd.Parameters.Add(new SqlParameter("Status", System.Data.SqlDbType.NChar)).Value = status.Key;

            ExecuteCommand(connection, cmd);
        }
예제 #2
0
 public void CloseSession(SessionStatus status)
 {
     var sessionKey = HttpContext.Current.Session.SessionID;
     _LoggerDao.CloseSession(sessionKey, status);
 }