Pomelo.entityframeworkcore.mysql: .Net Core 3 support time frame?

Created on 9 Jul 2019  路  40Comments  路  Source: PomeloFoundation/Pomelo.EntityFrameworkCore.MySql

Hello Team;

When do you expect to release the RTM/GA version for ASP.Net Core 3.0?
Thank you in advance?
..Ben

closed-question type-question

Most helpful comment

@BenHayat @FlyingWraptor The EF team is planning to spend some time helping update this provider to support 3.0. I'm not committing to a time-frame, but I expect us to get to it shortly after the 3.0 release.

/cc @caleblloyd

All 40 comments

The 2.2.0 preview 1 was released a month after the release of asp.net core 2.2.0 so I'm figuring it will not be anytime before the release of 3.0

@FlyingWraptor ;
Thank you for the info.
So we should expect a new update by Nov. 2019.

@BenHayat @FlyingWraptor The EF team is planning to spend some time helping update this provider to support 3.0. I'm not committing to a time-frame, but I expect us to get to it shortly after the 3.0 release.

/cc @caleblloyd

FYI, the underlying provider library, MySqlConnector, is tracking .NET Core 3.0 support (e.g., https://github.com/mysql-net/MySqlConnector/issues/642) and has a version supporting netcoreapp3.0 in beta.

@bgrainger I get the exception with version 2.2.1-preview1-final when call DbContextOptionsBuilder.UseMySql(string connectionString)

System.TypeLoadException: Method 'get_Info' in type 'Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal.MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at Microsoft.EntityFrameworkCore.MySqlDbContextOptionsExtensions.UseMySql
   at ZKEACMS.EntityFrameWorkConfigure.OnConfiguring(DbContextOptionsBuilder optionsBuilder, DbConnection dbConnectionForReusing) in E:\GitHub\ZKEACMS.Core\src\ZKEACMS\EntityFrameWorkConfigure.cs:line 57
   at ZKEACMS.ServiceCollectionExtend.<>c__0`1.<AddDbContextOptions>b__0_0(IServiceProvider sp) in E:\GitHub\ZKEACMS.Core\src\ZKEACMS\Extend\ServiceCollectionExtend.cs:line 22
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at ZKEACMS.Redirection.RedirectRouteConstraint.Match(HttpContext httpContext, IRouter route, String routeKey, RouteValueDictionary values, RouteDirection routeDirection) in E:\GitHub\ZKEACMS.Core\src\ZKEACMS.Redirection\RedirectRouteConstraint.cs:line 27
   at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.ProcessConstraints(Endpoint endpoint, KeyValuePair`2[] constraints, HttpContext httpContext, RouteValueDictionary values)
   at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.MatchAsync(HttpContext httpContext)
   at Microsoft.AspNetCore.Routing.Matching.DataSourceDependentMatcher.MatchAsync(HttpContext httpContext)
   at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

My application is run on .net core 3.0 preview 7

Pomelo.EntityFrameworkCore.MySql 2.2.1 is not compatible with Entity Framework Core 3.0; you can only use it with Entity Framework Core 2.2.

Thanks! It works really perfect when fall back to use Entity Framework Core 2.2.
By the way, is there any plan to support Entity Framework Core 3.0?

I would appreciate it, if we could start the migration process already, before the final release it out. I'd love to help, I just don't know, where to start

Just to let everone know: I'm working on the upgrade. Once I'll get a bit further, I'll open a WIP PR to let you guys take part in it. So far it seems like a lot of updating to async methods...

Is there anything .net Core 3.0 testable yet? Looks like EF Core 3.0 is complete.

I still got around 20 issues left in order to compile it successfully. Hopefully I'll be able to open the WIP PR untill friday. Can't promise that everything is updated correctly tho.

Is the work mainly going to be based on Provider-impacting changes, or are there other sources of information to consider?

I based my work so far mainly of the changes made within the EFCore repo regarding SqlServer and Sqlite between the versions 2.2 and 3, as I didn't even knew that document. I pushed my changes to a WIP PR. Feel free to take over!

@twsI Comparing the changes to the other repos is likely the more practical approach. Good job so far!

I opened 2.2.6 PR under #820 .

Once it's merged, I'll try to rebase my commits

We also can use EF Core 2.x Providers in .NET Core 3.0 projects :-)

@ElderJames It should be possible to use .NET Core 3.0 together with EF Core 2.2 and Pomelo's MySQL 2.2.0.

Can confirm that, I'm using that setup in production currently and it works fine!

@lauxjpn Yes,so far we can use this solution and work around

Goog job! Hope to provide a nuget package(for .NET Core 3.0) as soon as possible.

I think it is realistic to have a first preview ready by the end of the week.

3.0.0 nightly builds are now available. Feed instructions are updated on README and nightly builds are available on Azure DevOps Feed

Congratulations to the whole team for this milestone. I'm using Pomelo for MariaDB database.
Thanks!

Hello,
I have been developing a project with Asp.Net Core 2.2 for a long time.
I copied this project and updated to Asp.Net Core 3.
On the new project (with Asp.Net Core 3) I updated Pomelo from version 2.2 to version 3.0.0-rc1.19503.2.
When I start the project in the output of Visual Studio 2019 I get the following error:
fail: Microsoft.EntityFrameworkCore.Database.Command[20102] Failed executing DbCommand (28ms) [Parameters=[@__idDocumento_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30'] SELECT d.Id, d.Abstract, d.Attivo, d.CategoriaIdCategoria, d.Corpo, d.IdCategoria, d.IdTemplateDocumento, d.IdTipoDocumento, d.MetaDescription, d.MetaKeywords, d.MetaTitle, d.TemplateDocumentoIdTemplateDocumento, d.TipoDocumentoIdTipoDocumento, d.Titolo, d.Url FROM Documenti AS d WHERE (d.Id = @__idDocumento_0) AND @__idDocumento_0 IS NOT NULL LIMIT 1 fail: Microsoft.EntityFrameworkCore.Query[10100] An exception occurred while iterating over the results of a query for context type 'FFM.Data.FFMDbContext'. MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'd.CategoriaIdCategoria' in 'field list' ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'd.CategoriaIdCategoria' in 'field list' at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 49 at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet() in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 125 at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 338 at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\CommandExecutor.cs:line 63 at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 218 at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.QueryingEnumerable1.Enumerator.MoveNext() MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'd.CategoriaIdCategoria' in 'field list' ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown column 'd.CategoriaIdCategoria' in 'field list' at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 49 at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet() in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 125 at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 338 at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\CommandExecutor.cs:line 63 at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 218 at System.Data.Common.DbCommand.ExecuteReader() at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.QueryingEnumerable1.Enumerator.MoveNext()
I don't understand why the "CategoriaIdCategoria" column appears in the query since it doesn't exist in the database.
In my DBContext I mapped my "Documents" object like this:
`modelBuilder.Entity().ToTable("Documenti");
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.IdDocumento);

            entity.HasIndex(i => i.IdTipoDocumento).HasName("IdTipoDocumento");
            entity.HasIndex(i => i.IdTemplateDocumento).HasName("IdTemplateDocumento");
            entity.HasIndex(i => i.IdCategoria).HasName("IdCategoria");
            entity.Property(e => e.IdDocumento).HasColumnName("Id");
            entity.Property(e => e.Titolo).HasColumnType("nvarchar(255)").HasColumnName("Titolo");
            entity.Property(e => e.Url).HasColumnType("nvarchar(255)").HasColumnName("Url");
            entity.Property(e => e.Abstract).HasColumnType("nvarchar(255)").HasColumnName("Abstract");
            entity.Property(e => e.Corpo).HasColumnType("text").HasColumnName("Corpo");
            entity.Property(e => e.Attivo).HasColumnName("Attivo");
            entity.Property(e => e.MetaTitle).HasColumnType("nvarchar(255)").HasColumnName("MetaTitle");
            entity.Property(e => e.MetaDescription).HasColumnType("text").HasColumnName("MetaDescription");
            entity.Property(e => e.MetaKeywords).HasColumnType("nvarchar(255)").HasColumnName("MetaKeywords");

            entity.HasOne(d => d.TipoDocumento).WithMany(p => p.Documenti).OnDelete(DeleteBehavior.Restrict);
            entity.HasOne(d => d.TemplateDocumento).WithMany(p => p.Documenti).OnDelete(DeleteBehavior.Restrict);
            entity.HasOne(d => d.Categoria).WithMany(p => p.Documenti).OnDelete(DeleteBehavior.Restrict);
        });

modelBuilder.Entity().ToTable("Immagini");
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.IdImmagine);

            entity.HasIndex(i => i.IdDocumento).HasName("IdDocumento");
            entity.Property(e => e.IdImmagine).HasColumnName("Id");
            entity.Property(e => e.Nome).HasColumnType("nvarchar(255)").HasColumnName("Nome");
            entity.Property(e => e.File).HasColumnName("File");
            entity.Property(e => e.Attivo).HasColumnName("Attivo");

            entity.HasOne(d => d.Documento).WithMany(p => p.Immagini).OnDelete(DeleteBehavior.Cascade);
        });

modelBuilder.Entity().ToTable("Allegati");
modelBuilder.Entity(entity =>
{
entity.HasKey(e => e.IdAllegato);

            entity.HasIndex(i => i.IdDocumento).HasName("IdDocumento");
            entity.Property(e => e.IdAllegato).HasColumnName("Id");
            entity.Property(e => e.Nome).HasColumnType("nvarchar(255)").HasColumnName("Nome");
            entity.Property(e => e.File).HasColumnName("File");
            entity.Property(e => e.Attivo).HasColumnName("Attivo");

            entity.HasOne(d => d.Documento).WithMany(p => p.Allegati).OnDelete(DeleteBehavior.Cascade);
        });

`

@Gargano83 I opened a new issue for your reported error under #851.

Release 3.0.0-rc1 is now available via NuGet.

With Release 2.2.6 I got
System.TypeLoadException: 'Method 'get_Info' in type 'Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal.MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=2.2.6.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'

@eduardoxvii This exception has been discussed multiple times (even in this very same thread).

Please only use compatible references with each other.
The following table summarizes the versions currently compatible with each other:

Pomelo.EntityFrameworkCore.MySql | EF Core | .NET Core
-- | -- | --
2.2.6 | 2.2.6 | 2.2 / 3.0
3.0.0-rc1.final (prerelease) | 3.0.0 | 3.0

So will the .NET.CORE 3.0 version finally support MySQL JSON columns. I mean surely just treating them as VARCHARs in the Scaffolding feature would do it? The 3.0.0-rc1.final still does not telling me the columns are skipped.

The next (and probably last) prerelease 3.0.0-rc2.final should be available on Monday (2019-11-04).

@edpaay The 3.0.0 branch is already in feature-lock mode. However, if you open an issue (with some details), I will take a look at the JSON support for the 3.1.0 release.

Release 3.0.0-rc2 is now available via NuGet.

Release 3.0.0-rc3 is now available via NuGet.

Public release 3.0.0 is now available via NuGet.

Thank you to everybody who contributed by submitting pull requests, bug reports, took part in discussions or helped others solving issues!

We will be updating the wiki over the course of the week.

On behalf of the community thank you Laurents! Without the substantial time and effort you invested into this project the EF Core 3.0 update wouldn't have been possible.

Public release 3.0.0 is now available via NuGet.

Thank you to everybody who contributed by submitting pull requests, bug reports, took part in discussions or helped others solving issues!

We will be updating the wiki over the course of the week.

This video will walk you through how to use pomelo.entityframeworkcore.mysql with asp.net core 3.0 for a asp.net membership based react application https://www.youtube.com/watch?v=X4I0DUw6C84

Thanks a ton Pomelo team for faster support to asp.net membership feature than the official Microsoft.EntityFrameworkCore.MySql

Thanks a ton Pomelo team for faster support to asp.net membership feature than the official Microsoft.EntityFrameworkCore.MySql

I think you mean the official MySQL provider at Oracle not Microsoft. Strictly speaking the ASP.NET membership feature is named Identity to avoid any confusion with the old membership provider.

Actually, it seems we did supply Microsoft as the author on our 3.0.0 release to NuGet (and also our pre-releases).

@caleblloyd Could this be an issue of the CI migration to Arcade?

It looks like we are missing tags like Authors and PackageId as mentioned in Quickstart: Create and publish a package (dotnet CLI) in our project.

Maybe Arcade has some Microsoft defaults to fall back on in case these are not explicitly set?

@windson Thank you for sharing your tutorial video with the community!

Was this page helpful?
0 / 5 - 0 ratings