Exemple #1
0
        public void TestCreateUser()
        {
            String username = "******";
            String password = "******";
            UserService service = new UserService();
            UserDto dto = service.ValidateUser(username, password);
            SessionService sessionService = new SessionService();
            Session session = sessionService.CreateSession(dto);

            Console.WriteLine(session.Name);
        }
Exemple #2
0
        public Session CreateSession(UserDto user)
        {
            if (user != null)
            {
                ISessionService sessionService = new SessionService();
                Session session = sessionService.CreateSession(user);
                _sessionMap.Add(user.Id, session);
                return session;
            }

            return null;
        }