private async void StoreSession(int id, string sessionData) { CreateAuthenicatedSession createSession = HttpContext.Session.GetObject <CreateAuthenicatedSession>(AUTHENTICATED_SESSION_KEY); if (createSession != null) { createSession.SessionData = sessionData; HttpContext.Session.SetObject(AUTHENTICATED_SESSION_KEY, createSession); } else { byte[] encryptedSessionData = await encryptionService.Encrypt(sessionData); authenticatedSessionRepository.StoreSession(id, encryptedSessionData).Wait(); } }
private async void StoreSession(int id, string sessionData) { byte[] encryptedSessionData = await encryptionService.Encrypt(sessionData); await authenticatedSessionRepository.StoreSession(id, encryptedSessionData); }