Category Archives: MVC project

How to connect to MySQL via C# (MVC application) – step by step

Step 1.You have to install MySQL Connector: (important: here select the latest version of MySQL connector!) Step 2.Add reference to your project: MySql.Data Step 3.You have to add this namespace: using MySql.Data.MySqlClient; Test code: public ActionResult TestReadMySQL() { string … Continue reading

Posted in c#, MVC project, MySQL | Leave a comment