Click here to Skip to main content
15,887,268 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am trying to connect entity framework and mySQL. Why i get this error? (Cannot convert 2 arguments from 'string' to 'MicrosofEntityFrameworkCore.ServerVersion')

What I have tried:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder
.UseMySql(@"server=localhost;port=3306;database=shopDb;user=root;password=mysql123;");

}
Posted
Updated 3-Sep-21 10:10am
Comments
Wendelius 3-Sep-21 15:42pm    
Which (nuget) package you're using?
deriny0 3-Sep-21 15:57pm    
Package Pomelo.EntityFrameworkCore.MySql -Version 5.0.1

1 solution

 
Share this answer
 
Comments
deriny0 3-Sep-21 16:37pm    
I specified the version I used, thank you very much!
Wendelius 4-Sep-21 0:01am    
Glad you got it working!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900