I added a cshtml page in an project. When I tried to add the following declaration to it, I get an error: \"The name \'model\' does not exist in current context\".
Closing Visual Studio and re-opening worked for me. Must be a weird bug.