/// <summary> /// Removes the session. /// </summary> /// <param name="context">The context.</param> /// <param name="sessionToken">The session token.</param> public void RemoveSession(OpenAccessContext context, string sessionToken) { object session = this.GetSessionByToken(context, sessionToken); if (session != null) { context.Delete(session); } }
/// <summary> /// Removes the session. /// </summary> /// <param name="context">The database context.</param> /// <param name="sessionToken">The session token.</param> public void RemoveSession(OpenAccessContext context, string sessionToken) { object session = this.GetSessionByToken(context, sessionToken); if (session != null) { context.Delete(session); } }
/// <summary> /// Removes all the sessions of an user. /// </summary> /// <param name="context">The context.</param> /// <param name="userId">The user identifier.</param> protected void RemoveSessionsOfUser(OpenAccessContext context, long userId) { IList sessions = this.GetAllSessionsOfUser(context, userId); if (sessions != null) { foreach (object session in sessions) { context.Delete(session); } } }
/// <summary> /// Removes all the sessions of an user. /// </summary> /// <param name="context">The context.</param> /// <param name="userId">The user identifier.</param> protected void RemoveSessionsOfUser(OpenAccessContext context, long userId) { IList sessions = this.GetAllSessionsOfUser(context, userId); if (sessions != null) { foreach (object item in sessions) { context.Delete(item); } } }