Pergunta

I have a Visual Studio MVC5 project, I also have a Telerik Data Access project, I have created Web Api controllers form my Data Access models. My question is:

Can I move the created controller files (.cs) from the root of my project to a folder? Like the Controllers folder for example.

Hope this makes sense and thanks in advance.

Foi útil?

Solução

You can move the controllers to any folder and the web api framework will find it as long as your controllers implement the interface System.Web.Http.Controllers.IHttpController or inherit from ApiController, which implements this interface and is a common usage pattern.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top