DNXCORE 5.0 和 mysql/mariadb

DNXCORE 5.0 and mysql / mariadb(DNXCORE 5.0 和 mysql/mariadb)
本文介绍了DNXCORE 5.0 和 mysql/mariadb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于必须针对 Linux 和 Windows 的新项目,我正在寻找支持 MySQL(或 MariaDB)的解决方案.

因为我们必须支持那些不同的平台,所以我希望在 DNX Core5.0 上工作.但是我找不到任何可用于连接数据库的 nuget 包/连接器.DNX core 5.0 不支持我发现的那个.

有没有办法在 DNX core 5.0 中连接到 mysql ?还是你必须依靠 ODBC 连接,我不知道这是否可行......

进一步我正在寻找一个 ORM 来支持这一点,我的研究直到现在发现

  • Entity Framework 7 目前不支持 MySQL.(而 EF 目前不是我最喜欢的 ORM)
  • NHibernate:目前没有人在研究它,将其移植到 DNX Core 将很困难(重大更改)
  • Dapper:(我知道 MicroORM ...):这支持 DNXCore,但我需要一个我无法创建的有效 IConnection.

感谢您的反馈!

罗伯

解决方案

几周前我问了一个类似的问题.DNX Core 没有 MySql 连接器.我不得不退回到 DNX 4.5.1,并且能够在 Docker 容器内运行的项目中使用 MySql 和实体框架.另请参阅回复我的问题.p>

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)