0
votes

I am evaluating Xamarin and I am hoping to clarify that I am on the correct path. We would like to create a Xamarin forms app with offline sync. We are using azure to host the backend database. I have created an Azure web app that uses as Azure SQL database. I have seen example using easy tables, which seems to create the API’s for you but I cannot find any examples where an Azure SQL database is used.

I have gone to the quick start blade of my azure web app, selected Xamarin.Forms, then chose the backend language of C# and downloaded the project. The project included the TodoItems table as an example. Am I correct in thinking that I need to replace this code with the model of the tables I have in my azure SQL database? And then add the changes back to the web app to expose the tables so that the xamarin forms app can use? Or am I completely on the wrong track? Should I be using swagger (which I have no experience with) to create the API? Thanks.

1

1 Answers

0
votes

From How to: Define a table controller, you could find that Data Transfer Object (DTO) class that is used to define the table within the SQL database need to inherit from EntityData class. And deriving it from EntityData class is aimed at making it support the system properties. It seems that you have created some tables in your Azure SQL database, if you’d like to expose these existing SQL database tables that does not contain these system properties, please refer to “Using an existing SQL Table” in chapter 3.