user3925079
user3925079

Reputation:

C# importing MySql with Xamarin

So I have encountered a problem. I tried to add this while using Xamarin in Visual Studio 2015:

using MySql.Data.MySqlClient;

This sadly doesn't work. Does anybody know how you can import MySql with Xamarin?

Upvotes: 3

Views: 442

Answers (1)

Wosi
Wosi

Reputation: 45213

Since Xamarin is used for mobile applications I assume there is simply no version of a MySQL database client available which runs on the .NET subset used in Xamarin.iOS or Xamarin.Android.

Usually mobile applications do not connect to a database server directly. They read and write data through a Web API service (e.g. REST or SOAP) instead.

It's bad practice due to security issues to allow the direct access to a database server over the internet to everybody who is using your app. You would need to store database credentials inside the app. Attackers could easily get these credentials in order to manipulate the database. I highly recommend to reconsider the system's architecture.

Upvotes: 2

Related Questions