📜  servicestack 在服务中保存会话 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:44.327000             🧑  作者: Mango

代码示例1
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();
    // modify session
    base.Request.SaveSession(session);
}