问题描述
对于一个需要针对Linux和Windows的新项目,我正在寻找一种支持MySQL(或MariaDB)的解决方案。由于我们必须支持那些不同的平台,我希望在DNX Core5.0上工作。但是我找不到任何可以用来连接数据库的nuget软件包/连接器。我发现的是DNX核心5.0不支持的。
有没有办法连接到DNX核心5.0中的mysql?或者你必须回到ODBC连接,我不知道这是否会工作...
此外,我正在寻找一个ORM来支持这个,我的现在研究发现,这个时候实体框架7不支持MySQL,
- (和EF在这个时候不是我最喜欢的ORM)
- NHibernate:目前没有人在处理它,这将是困难的(打破变化)将其移植到DNX Core
- Dapper:(MicroORM我知道...):这是支持DNXCore,但我需要一个无法创建的vallid IConnection。
感谢您的反馈!
Rob
几周内我问了一个类似的问题前。 DNX Core没有MySql连接器。我不得不回到DNX 4.5.1,并且能够在运行在Docker容器中的项目中使用MySql与Entity Framework。另请参阅。
For a new project which has to target Linux and Windows, I am searching for a solution to support MySQL (or MariaDB).
Because we have to support those different platforms I wish to work on DNX Core5.0. However I can't find any nuget packages / connectors which I can use to connect to the database. the one that i find are not supported by DNX core 5.0.
Is there a way to connect to mysql in DNX core 5.0 ? Or do you have to fall back on ODBC connections, i don't know if this would work...
Further i was searching for an ORM to support this, my research till now found out that
- Entity Framework 7 is not supporting MySQL at this moment. (and EF is not my favorite ORM at this moment)
- NHibernate: Currently nobody is working on it and it will be difficult (breaking changes) to port it to DNX Core
- Dapper: (MicroORM I know ...): This is supporting DNXCore but i need a vallid IConnection which I can't create.
Thanks for your feedback!
Rob
I asked a similar question a couple of weeks ago. There is no MySql connector for DNX Core. I had to fall back to DNX 4.5.1 and was able to use MySql with Entity Framework in a project that's running inside a Docker container. Also see the response to my question.
这篇关于DNXCORE 5.0和mysql / mariadb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!