Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top