public async Task <IActionResult> Handle()
        {
            successOrError = await usersRepository.UserSessionSetSelectedCharacter(customerGUID, UserSessionGUID, SelectedCharacterName);

            output = await usersRepository.GetUserSession(customerGUID, UserSessionGUID);

            return(new OkObjectResult(output));
        }
示例#2
0
        public async Task <GetUserSession> GetUserFromEmail(Guid _CustomerGUID, string _Email)
        {
            GetUserSession OutputObject = new GetUserSession();

            //Add Implementation

            return(OutputObject);
        }
示例#3
0
        public async Task <GetUserSession> GetUserFromEmail(Guid customerGUID, string email)
        {
            GetUserSession outputObject = new GetUserSession();

            using (Connection)
            {
                outputObject = await Connection.QueryFirstOrDefaultAsync <GetUserSession>(MSSQLQueries.GetUserFromEmailSQL, new { CustomerGUID = customerGUID, Email = email });
            }

            return(outputObject);
        }
示例#4
0
        public async Task <GetUserSession> GetUserSessionORM(Guid customerGUID, Guid userSessionGUID)
        {
            GetUserSession outputObject = new GetUserSession();

            using (Connection)
            {
                outputObject = await Connection.QueryFirstOrDefaultAsync <GetUserSession>(MSSQLQueries.GetUserSessionSQL, new { CustomerGUID = customerGUID, UserSessionGUID = userSessionGUID });
            }

            return(outputObject);
        }
示例#5
0
        public async Task <GetUserSession> GetUserSession(Guid customerGUID, Guid userSessionGUID)
        {
            GetUserSession outputObject = new GetUserSession();

            using (Connection)
            {
                var p = new DynamicParameters();
                p.Add("@CustomerGUID", customerGUID);
                p.Add("@UserSessionGUID", userSessionGUID);

                outputObject = await Connection.QuerySingleOrDefaultAsync <GetUserSession>("GetUserSession",
                                                                                           p,
                                                                                           commandType : CommandType.StoredProcedure);
            }

            return(outputObject);
        }
示例#6
0
        public async Task <GetUserSession> GetUserSessionORM(Guid _CustomerGUID, Guid _UserSessionGUID) //id = UserSessionGUID
        {
            GetUserSession OutputObject = new GetUserSession();

            using (Connection)
            {
                /*OutputObject = await Connection.QueryFirstOrDefaultAsync<GetUserSession>(@"SELECT US.""CustomerGUID"", US.""UserGUID"", US.""UserSessionGUID"", US.""LoginDate"",
                 * US.""SelectedCharacterName"",
                 * U.""FirstName"", U.""LastName"", U.""CreateDate"", U.""LastAccess"", U.""Role""
                 * FROM ""public"".""UserSessions"" US
                 * INNER JOIN ""public"".""Users"" U
                 *  ON U.""UserGUID""=US.""UserGUID""
                 * WHERE US.""CustomerGUID""=@CustomerGUID
                 * AND US.""UserSessionGUID""=@UserSessionGUID", new { CustomerGUID = _CustomerGUID, UserSessionGUID = _UserSessionGUID });*/

                OutputObject = await Connection.QueryFirstOrDefaultAsync <GetUserSession>(PostgreQueries.GetUserSessionSQL, new { CustomerGUID = _CustomerGUID, UserSessionGUID = _UserSessionGUID });
            }

            return(OutputObject);
        }
示例#7
0
 public object Any(GetUserSession request)
 {
     return(new CustomUserSession());
 }
示例#8
0
        public async Task <IActionResult> Handle()
        {
            output = await usersRepository.GetUserSession(customerGUID, UserSessionGUID);

            return(new OkObjectResult(output));
        }