Microsoft.EntityFrameworkCore 2.1 with MySql Database

Pomelo.EntityFrameworkCore.MySql need to use MySql Database with Microsoft.EntityFrameworkCore 2.1.

Install-Package Pomelo.EntityFrameworkCore.MySql -Version 2.1.0-rc1-final


    public static void ConfigureMYSQLContext(this IServiceCollection services, IConfiguration configuration)
        {
            var connectionString = configuration.GetConnectionString("MySqlstr");
            services.AddDbContext<RepositoryContext>(o => o.UseMySql(connectionString));           
        }

Comments

Popular posts from this blog

Chat Bot

Entity Framework

Microsoft Enterprise Library-Data Access Application Block for for .Net Core & .Net Standard