CS0103 C# The name 'Json' does not exist in the current context


Question: How do you solve the error "The name 'Json' does not exist in the current context in Asp.Net 5 Web API.

Login to See the Rest of the Answer

Answer:
Use ActionResult as a return type and not IActionResults. Make sure that your API Controller is inheriting from Controller and Not ControllerBase. Comment below if this helped you or if there is something we should help you with.

 


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2023 - ErnesTech LLC- Privacy