© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
ayman23

❔ API controller implementation inside mvc 5 app

Hello developers,
I need help with my project, i am relatively new to .net development but i understand the basics.

I already have the existing web app in mvc5 working with a couple of controllers that save some data in a db and generate an excel file.
My project is to develop a mobile app with the same ui as the web app (which i have already done using xamarin forms) and send the data from the mobile app to the web app that will be processed using controller logic and saved to the db.

The mobile app has is only for entring data and saving model data to db. The backend should be done inside the web app since we already have the logic there once the data is sent via Api

I am trying to create an api controller inside my web app that calls the actions in the web app controllers upon receiving model data via the api post request.
Is this the right way to do it or there is a better way? ( I had some suggestions creating a new Web Api project and copy all the code from my web app controllers but wouldn't that be redundant?)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Datepicker in ASP NET MVC 5 app
C#CC# / help
3y ago
getting acces token inside mvc
C#CC# / help
2y ago
✅ mvc 4 entity framework 5.
C#CC# / help
3y ago