Chaos.Portal.Core.Data.PortalRepository.SessionUpdate C# (CSharp) 메소드

SessionUpdate() 공개 메소드

public SessionUpdate ( System.Guid guid, System.Guid userGuid ) : Model.Session
guid System.Guid
userGuid System.Guid
리턴 Model.Session
        public Session SessionUpdate(Guid guid, Guid userGuid)
        {
            var result = Gateway.ExecuteNonQuery("Session_Update", new[]
            {
                new MySqlParameter("UserGuid", userGuid.ToByteArray()),
                new MySqlParameter("WhereSessionGuid", guid.ToByteArray()),
                new MySqlParameter("WhereUserGuid", null)
            });

                        if(result == 0) throw new SessionDoesNotExistException("Session was not updated because it doesn't exist");

            return SessionGet(guid, userGuid).Single();
        }