Answers for "servicestack save session in service"

1

servicestack save session in service

Saving a session in a ServiceStack Service
As a typed session is just a disconnected POCO, it needs to 
explicitly saved to be persisted - which you can do with 
the base.SaveSession() Extension method.

public object Any(Request request)
{
    var session = base.SessionAs<AuthUserSession>();
    // modify session
    base.Request.SaveSession(session);
}
Posted by: Guest on April-04-2020

Browse Popular Code Answers by Language