【发布时间】:2017-09-10 23:12:44
【问题描述】:
我已经成功创建了一个托管在 Ubuntu Linux 服务器上的 asp.net core mvc 应用程序。网站运行正常。
今天我将实体框架添加到我的项目中。我可以将数据发布到我的数据库并在我的 Windows 机器上检索它,这样就可以了。
当我将我的项目移动到我的 Ubuntu 机器上时,网站可以正常工作,但是当我尝试访问需要我的数据库的页面时,我会收到以下错误:
PlatformNotSupportedException: LocalDB is not supported on this Platform.
System.Data.SqlClient.SNI.LocalDB.GetLocalDBConnectionString(string localDbInstance)
我的 Ubuntu 机器上是否缺少 Entity Framework/SQL_Server 包,还是有其他原因?
【问题讨论】:
-
您将使用 Linux,因此请使用这些操作系统原生的 MySql 或 MariaDB,它适用于 EF7 和 .net Core
标签: c# asp.net entity-framework ubuntu