I am looking into creating a cross-platform mobile app in Xamarin that utilizes a SQL server database; specifically an Azure SQL Database. The app needs to send CRUD commands and receive multiple rows back from the SQL server database. The CRUD commands dynamically change depending on the choices of the app user. So I need to send CRUD commands that have variables. I also know that I need to make a web service and not connect to SQL Server directly in mobile apps.
But I am facing problems.
1) The biggest problem I am having is finding any documentation that shows if it's possible to send CRUD commands that include variables to a web service from Xamarin/C# like I mentioned earlier. It's crucial I can do this because my app needs the user to have a lot of control over what gets sent to the sql server database. Sometimes the CRUD command will have WHERE clauses with varying multiple AND's and sometimes it will have no ANDS. I will run into a problem where it will be time-consuming to get every possible combination of ANDS required for the user and keeping up with them if something changes in the schema. Unless there is a workaround I must be able to pass variables and I do not see how to do this currently with Xamarin and Web Services.
3) So I guess maybe I should ask: Do you think I should be ok with just having a vast amount of api function calls instead of worrying about having variable support for CRUD commands? I mean I think it would take at the least 254 api function calls with different CRUD commands to get the app working at this point. But the number could easily rise if more schema data is added which is very possible. I just don't think it's a wise choice to go that route.
I have looked at the following resources:
This talks about using the Node.js framework LoopBack to query a SQL Server database in Xamarin. But from what I've read and seen in a youtube video, this framework has a web interface where you can input CRUD commands for a specific api call function but it doesn't explain or even mention how you would go about inserting variables from Xamarin into the CRUD commands.
Thanks for reading.