Connect MySQL to ASP.Net Web App

From TRCCompSci - AQA Computer Science
Revision as of 19:24, 8 October 2024 by Admin (talk | contribs) (Install MySQL.Data)
Jump to: navigation, search

Install MySQL.Data

Using the Nuget Package Manager install the following:

  • MySql.Data;
  • MySql.Data.MySqlClient;

Creating the connection

Now using the page you want to connect, open the Model `cs` code.

At the top add the following

using MySql.Data;
using MySql.Data.MySqlClient;