Pomelo.entityframeworkcore.mysql: Entity framework core and MySql.Data in the same project

Created on 15 Jan 2020  ·  3Comments  ·  Source: PomeloFoundation/Pomelo.EntityFrameworkCore.MySql

Steps to reproduce

MySql.Data + Pomelo.EntityFrameworkCore.MySql in the same solution but different projects.

The issue

If we have a visual studio solution, where one project uses MySQL.Data nuget package for legacy code that creates MySqlConnection objects, and another project that uses EF Core with Pomelo nuget package, we are getting ambiguous errors in VS when creating these legacy MySqlConnection objects, because both projects use the same namespace (MySql.Data.MySqlClient). Is it possible somehow to fix this?

Further technical details

MySQL version: 5.7.29
Operating system: Windows 10
Pomelo.EntityFrameworkCore.MySql version: 3.1

closed-question type-question

Most helpful comment

See Use a different namespace for MySqlConnector.

All 3 comments

See Use a different namespace for MySqlConnector.

Especially the last comment from the issue @mguinness referenced looks good:
https://github.com/mysql-net/MySqlConnector/issues/189#issuecomment-543583735

The same principal can also be found on StackOverflow.

Thanks for the help, now i feel super dumb :)

Was this page helpful?
0 / 5 - 0 ratings