I have data that's on my server in a SQL Server database. I can access that with a REST call into a C# ASP.Net Web.API that I have control over and it will return json data. Possibly I can get that to return other formats of data but I am not sure about that. I have full access to the server application and the json it creates.
On my development Mac I am using DB Browser for SQLite and Xamarin to develop a multi-platform app. I have a small SQLite database created.
How can I import/insert the JSON data from some of my tables on the server to tables in the SQLite database that I create on my MAC? I need to do this manually but I would like to automate the process of doing the import into a bash script or something similar that I can run with a command.
I have researched this but don't seem to be able to find any examples of how to do it so I opened up a bounty in the hope that someone could give an answer that would be a big help to me and to others.
Off the top of my head, you have two options that you can do:
In my previous app, I had XUnit tests that checked to make sure the API calls were working and other tests to ensure that my SQLite.Net-PCL code was working. You could combine that into a single "test" to download the data into a db3.
This assumes you abstracted your code out. If not, you could just copy and paste it. Either way, if you are using x-plat nuget packages the code will work on desktop or mobile app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With