Forum Xamarin.Forms

Best practices for having the same back-end database for Xamarin.Forms App and ASP.Net(Core/MVC/API)

bytebuilderbytebuilder USMember ✭✭

Hi everyone,
I am working on a Xamarin.Forms mobile App, for which I want to use Azure Easy Tables to provide off-line sync.
Additionally, I need to have both, an ASP.NET Web App and a Web API endpoints that connect to the same database, and allow displaying/modifying the data in the database, and authenticating against it.

So summarizing, I need:
1. A way to support off-line sync for my Xamarin.Forms app
2. Have a ASP.NET MVC and Web API that authenticate against the same database.
3. The Web App and Web API must also be able to interact with the database to perform CRUD operations.

Ideally, I would have just one ASP.NET MVC backend service that would have the following controllers:
- /auth/: to authenticate, create users, etc.
- /tables/: for easy tables support and offline sync
- /api/ : for other API functions I'd like to add as part of the same service.

1. Are there any best practices or design patterns to achieve this in the easiest and more maintenance friendly way?
2. Is it Possible/OK to publish a MVC/WebAPI service to an Azure App service that has EasyTables enabled? (meaning there would be both a Node.JS and ASPNET web app running at the same time?)
3. Bonus question: is it possible to use TableControllers in a ASP.NET Core 2.0 application?

Any points would be greatly appreciated! thanks a lot!

Sign In or Register to comment.