Skip to content
Loading
How to Pass Model to Session in MVC Core
  • Adalat  Khan
    Dear Mario Scheeren
    I changed the code according to your recommendation but it did not solve my problem. It gives me the same error. 
    0
  • Mario Scheeren
    1.  public static void SetSessionModelData(this ISession session, string key, T value)  
    2. {  
    3. session.SetString(key, JsonConvert.SerializeObject(value));  
    4. } 
    0