I’m having trouble creating a public async method Task<Actionresult> Synchronous action method C# Web API

Asked

Viewed 49 times

0

inserir a descrição da imagem aquiI am having this problem to create a method in the API does not recognize the Actionresult

Erro

  • 1

    already tried to put in using System.Web.Mvc; ?

  • taking advantage of the @Lucianoazevedo tip when this happens, put the cursor in the class name and press CTRL+. (dot) and VS will suggest the missing namespace (if it does not appear you may be missing include the Assembly reference in the project or the class name may be wrong)

  • I put using System.Web.Mvc also does not work and in CTRL+. (dot) follows nothing but make the synchronous method

  • What would be the Assembly reference that I should add @Jmslasher

  • 1

    strange to be missing in this case, especially if you created the project from the application template Asp.net mvc... tries to go in the package manager nuget and search for Microsoft.AspNet.Mvc if it appears option to install, install

  • Have you tried referencing "Microsoft.AspNetCore.Mvc" ?

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.