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();
}