I have an application that I created in C# WinForms. I also have a MySQL database, which is not publicly accessible (only from related webhosting) - so no MySQL Connector available.
What I did is, that I send data from C# via POST method to PHP and PHP code execute my SQL queries. In case of SELECT query - PHP returns result in JSON string, which I deserialize in C# through some JSON DESERIALIZING extension.
I want to do the same app in C# WPF and later on with ASP.NET and maybe some PHP/JS(REACT) to train my knowledge with these platforms/languages/frameworks...
Which means - I would like to ask you, what do you think is the best way, to create the communication either for C# WinForm/WPF to MySQL and ASP.NET to MySQL?
I did some small research and found some technologies like: RESTful and SOAP. There are many others I believe, but I don't know which one I should really focus on. Which is the best for now and future? It doesn't matter how hard is to learn the technology! So "this is the simplest solution for your small app" is not the proper solution i am looking for as I am going to do larger apps in future and I want to focus on the best available technology,
Ask for more if needed.
Thanks.