I am hoping someone has had to do this before and can help.
I have a multi tier MVC application that I need to add WebApi, in preparation for moving to .Net Core + react and a new set of controls for displaying data.
App built on .net 4.7.2, SammyJS (SPA), knockout (will be switched to React in time), and MS SQL Server.
The current architecture uses viewmodels and flows as follows;
Controller (MVC app), Service layer, Repository, Controller (MVC app), View (MVC app)
What I want to do is add in a Web Api controller class library, but unsure where it should sit in this process...these are the scenarios I have thought about...
- mvc application, service, repo, webapi
- mvc application, service, web api (which replaces repo layer)
- mvc application, service, web api, repo
I am a little confused on the best course of action due to never having to add in Web Api into a service-repository design pattern as we have right now.