I am using ASP MVC to develop a new project. I am using the repository pattern for Data Access. I have worked on the same scenario before using SQL Server, but now I’m using MySQL.
How do I interact with MySQL using the repository pattern?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Database layer usually takes care of:
Regarding database-specific components, usually these are S
qlConnection,SqlDataReader,SqlCommandetc. They are Microsoft SQL Server specific. You will need to install MySql connector and use the supplied interface.Look here: Using MySQL Native .NET Providers
You will work with these objects:
MySqlConnection,MySqlCommand,MySqlDataReader,MySqlDataAdapter,MySqlParameter,MySqlTransaction.