a) Adding proper references
You can find "ContextService" in Sitecore.Mvc namespace / assembly.
Just add below using to your razor view:
and in your project references add reference to "Sitecore.Mvc" assembly.
You have couple of options to achieve this. Two of them are below:
Using nuget feed
from Sitecore Official nuget feed in version 9.0.171219 (that is correct one for Sitecore 9 Update 1). More information about nuget feeds can be found here -> https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/sitecore_public_nuget_packages_faq
- Copying Sitecore.Mvc.dll from bin folder to your shared lib folder in your project and reference it in csproj project file
b) Fixing GetCurrent method call
You should fix your code like this: