BugzyGeek
❔ API controller implementation inside mvc 5 app
My suggestion will be to move the Login from the controller another class which will return the result. This way the MVC Controller and the API Controller can both call the method of the class to get the work done and return the appropriate response. Although you can call the MVC controller Methods just like any other method in a class, MVC controllers normally returns ActionResult so moving the logic into a class that both controllers share will be the appropriate way.
4 replies