jeudi 14 avril 2016

Asp.Net Core - Separating MVC webpages and APIs areas from main project

I've a project wrote with Asp.Net Core, where I've the main project composed by the entry point, the application's API definition and the MVC definition of webpages. Business logic is distribuited into other projects.

For context separation I'm trying to split this project into three different: the entry point with the IoC initialization, a project with only APIs and a project with only web pages. Both new projects link to the same business logic.

First question is: could be this a good pattern? My idea is to have a more maintainable application with more smaller and specific projects. Exists a better way to achieve this scope?

Implementing this pattern when I try to run the application I get from browser this error message:

InvalidOperationException: The view 'Index' was not found. The following locations were searched:
 /Views/Home/Index.cshtml
 /Views/Shared/Index.cshtml

Second question: how can I specific to application startup where Views are located?

Aucun commentaire:

Enregistrer un commentaire