سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top