MVC Core:The name 'Session' does not exist in the current context

时间:2019-03-19 14:57:16

标签: c# asp.net-core .net-core asp.net-core-2.0

I am receiving the following error, how would I resolve this in MVC ASP Core 2 ?

The name 'Session' does not exist in the current context.

 Session.Remove(_currentProductResult);

Other Codes

  Session[_currentProductResult] = currentProductResult;

Error:

The name 'Session' does not exist in the current context    

Should I go with Version or something else in Intellisense? Sometimes Intellisense can be incorrect.

enter image description here

This resource is for older projects.

'Session' does not exist in the current context

0 个答案:

没有答案