Pravinkumar Birajdar

Pravinkumar Birajdar

  • 1.1k
  • 578
  • 102.4k

asp.net core error with mysql

Dec 16 2021 1:49 PM

The call is ambiguous between the following methods or properties: 'Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder, string, System.Action<MySql.EntityFrameworkCore.Infrastructure.MySQLDbContextOptionsBuilder>)' and 'Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder, string, System.Action<MySql.Data.EntityFrameworkCore.Infraestructure.MySQLDbContextOptionsBuilder>)'

My code is

public void ConfigureServices(IServiceCollection services)
        {
            services.AddDbContextPool<ProjectDataContext>(options => options.UseMySQL(_config.GetConnectionString("DefaultConnection")));
            services.AddMvc();
            
        }


Answers (2)