Connecting an ASP.NET MVC Application to MySQL

In this tutorial you are going to learn how to connect an ASP.NET MVC application to MySQL. We will also be creating a CRUD application that utilizes MySQL as data source and Entity Framework as object mapper. So let’s get started!

  1. Download and Install MySQL Installer from this link: https://dev.mysql.com/downloads/windows/installer/
    • After installation, open MySQL Installer then download the following softwares:
      1. MySQL Server (v5.5 or latest)
      2. MySQL WorkBench
      3. MySQL For Visual Studio
      4. MySQL Connect/NET
    • After installation of above 4 softwares, make sure to verify by checking Programs & Features under Control Panel. Refer to the image bellow.
  2. Create a project. Go to Visual Studio -> File -> New -> Project.
    • From the pop-up, make sure the following are selected. Click the “Ok” button when you’re done.
    • In the next screen, make sure to select MVC. Click “Ok” button when you’re done.
  3. After the project is successfully created, we now add reference to…..

Click here to download the FULL TUTORIAL